public void Dispose() { if (graphics != null) { graphics.Dispose(); } if (dot9BitmaShadowDict != null) { foreach (var item in dot9BitmaShadowDict) { item.Value.Dispose(); } dot9BitmaShadowDict.Clear(); } if (bitmap != null) { bitmap.Dispose(); bitmap = null; } if (wicBitmap != null) { wicBitmap.Dispose(); wicBitmap = null; } if (rebulidLayerList != null) { rebulidLayerList.Clear(); } if (rootParent != null) { rootParent.Dispose(); } }
public void Remove(ScLayer childLayer) { childLayer.RemoveContextRelationInfo(); childLayer.Dispose(); controls.Remove(childLayer); }