public void Dispose() { _atlasItems.Clear(); if (MainBitmap != null && IsMemBitmapOwner) { MainBitmap.Dispose(); MainBitmap = null; } }
public void SetMainBitmap(MemBitmap mainBmp, bool isOwner) { if (MainBitmap != null && MainBitmap != mainBmp && IsMemBitmapOwner) { //dispose current main bmp MainBitmap.Dispose(); MainBitmap = null; IsMemBitmapOwner = false; } MainBitmap = mainBmp; IsMemBitmapOwner = isOwner; }