Пример #1
0
        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();
            }
        }
Пример #2
0
 public void Remove(ScLayer childLayer)
 {
     childLayer.RemoveContextRelationInfo();
     childLayer.Dispose();
     controls.Remove(childLayer);
 }