I'm trying to delete my PictureBox completely as I don't need it anymore. I tried to use Dispose() method and this removed the PBox from the Form correctly, but not from the memory... After I applied Dispose(), I created a PBox and load the same image in it, then called Dispose() again and so on... What I see in the 'Diagnostic Tools / Process memory' window is the memory usage increased each time when I press the button (which create new PBox and load image into it), but the memory is never released... I also tried to use Controls.Remove() method but I got the same result!
So the question is: How can I release the memory and remove a PictureBox completely?
EDIT: Ok.. after a while when the program used up about 1Gb of memory (by create PBox/Dispose cycle) the garbage collector activated itself and released almost all of the memory used by the program! I misunderstood how this works... I thought it should have ran each time after I use Dispose method.. so looks all good, but is there any way to release PBox from memory manually after I applied Dispose?