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

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

kernel - How to create a "Block device" in Windows -