0

I am having out of memory while loading an image to draw on a custom view via onDraw. I am using NGraphics but I can't see the IImage has a function call recycle or dispose the bitmap. So how do I proper destroy the object.

LittleFunny
  • 8,155
  • 15
  • 87
  • 198
  • If you are using `IImage.LoadImage`, it returns a `BitmapImage` which has a `BitmapImage.Bitmap` property that returns a `Bitmap`. So you could call Dispose on that object, then `null` the `IImage` and call GC.Collect to force a clean up.... (This is from top of my head, results may vary) – SushiHangover Aug 18 '16 at 04:41
  • I used null and GC ... feel like it does the trick . – LittleFunny Aug 18 '16 at 06:11

0 Answers0