Memory increasing when changing image background


struct ContentView: View {
    @State var listOfImages: [String] = ["One", "Two", "Three", "Four"]
    @State var counter = 0
    var body: some View {
        VStack {
            Button(action: {
                
                counter += 1
                
            }, label: {
                Text("Next Image")
            })
        }
        .background(Image(listOfImages[counter]))
        .padding()
    }
}

When I click on the button, counter increases and the next image is displayed as the background. The memory usage of the app increases as each image changes. Is there anyway to maintain a steady memory use?

Memory increasing when changing image background
 
 
Q