Beispiel #1
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            if (disposing)
            {
                // free managed resources
                selection.Changed                      -= HandlePointerChanged;
                selection.Collection.Changed           -= HandleCollectionChanged;
                selection.Collection.ItemsChanged      -= HandleCollectionItemsChanged;
                ThumbnailLoader.Default.OnPixbufLoaded -= HandlePixbufLoaded;
                if (background_pixbuf != null)
                {
                    background_pixbuf.Dispose();
                    background_pixbuf = null;
                }
                if (background_tile != null)
                {
                    background_tile.Dispose();
                    background_tile = null;
                }
                if (thumb_cache != null)
                {
                    thumb_cache.Dispose();
                    thumb_cache = null;
                }
            }
            // free unmanaged resources
        }
Beispiel #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            if (disposing)
            {
                // free managed resources
                selection.Changed -= HandlePointerChanged;
                // FIXME, observable collections
                //selection.Collection.Changed -= HandleCollectionChanged;
                //selection.Collection.ItemsChanged -= HandleCollectionItemsChanged;
                App.Instance.Container.Resolve <IThumbnailLoader> ().OnPixbufLoaded -= HandlePixbufLoaded;
                if (background_pixbuf != null)
                {
                    background_pixbuf.Dispose();
                    background_pixbuf = null;
                }
                if (background_tile != null)
                {
                    background_tile.Dispose();
                    background_tile = null;
                }
                if (thumb_cache != null)
                {
                    thumb_cache.Dispose();
                    thumb_cache = null;
                }
            }
            // free unmanaged resources
        }
Beispiel #3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!isDisposed && disposing)
            {
                chainStateCursorCache.Dispose();
                blockStorage.Dispose();
                blockTxesStorage.Dispose();
                chainStateStorage.Dispose();

                isDisposed = true;
            }
        }
Beispiel #4
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         // free managed resources
         if (preview_cache != null)
         {
             preview_cache.Dispose();
             preview_cache = null;
         }
     }
     // free unmanaged resources
 }
 public void Dispose()
 {
     cursorCache.Dispose();
     deferredCursorCache.Dispose();
     db.Dispose();
 }