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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -