c# - Proper way to dispose a BitmapSource -
How are you told to settle a bitmapsource?
// This is not working because IDisposable does not apply using bitmap source (bitmapsource bitmap = new bitmap image (new yuri ("myimage.png")) {}
You do not have to settle () a. Other "image" sections in the framework Contrary to this, it does not wrap any native resources.
Just leave it out of the scope, and the garbage collector will free his memory.
Comments
Post a Comment