Hello all of you nice people.
I'm writing application in C# WPF, and using BitmapImage (System.Windows.Media.Imaging.BitmapImage) and Image (System.Windows.Controls.Image).
Now, I'm allocating 1000 images (that uses this nice and friendly BitmapImage), and see how my application memory usage is growing in like 20 M. Very good.
The problem is when I try to free those images. All of the images are being contained in a container (WrapPanel) and when I remove them from the panel, the memory isn't free. (though, the images are not visible anymore).
I made a nasty trick. I created a class with the original name "MyImage" that extends (Sorry, last year I worked with Java), and override the destructor, just to figure out that it is almost never being called, execpt when I close the application.
When I'm trying to clear the images when the application still running, after few moments - I get from the destructor only few calls out of 1000, and none of them releases any memory.
Does anyone knows what I'm doing wrong?
tnx,
Good day