Exemplo n.º 1
0
 public void Cleanup()
 {
     layout.DisposePixmaps();
     layout    = null;
     dataView  = null;
     dvControl = null;
 }
Exemplo n.º 2
0
        ///<summary>Create a DataView</summary>
        public DataView()
        {
            dvControl = new DataViewControl(this);
            dvDisplay = new DataViewDisplay(this);

            dvDisplay.Control = dvControl;
            dvControl.Display = dvDisplay;

            // initialize clipdata buffer
            // and clipboard
            clipdata  = new byte[0];
            clipboard = Gtk.Clipboard.Get(Gdk.Atom.Intern("CLIPBOARD", true));

            // initialize undo/redo cursor offset stacks
            cursorUndoDeque = new Deque <CursorState>();
            cursorRedoDeque = new Deque <CursorState>();

            prefID = "dv" + this.GetHashCode().ToString();
            PreferencesChangedHandler handler = new PreferencesChangedHandler(OnPreferencesChanged);

            Preferences.Proxy.Subscribe("Undo.Limited", prefID, handler);
            Preferences.Proxy.Subscribe("Undo.Actions", prefID, handler);
            Preferences.Proxy.Subscribe("Highlight.PatternMatch", prefID, handler);
            Preferences.Proxy.Subscribe("ByteBuffer.TempDir", prefID, handler);
        }
Exemplo n.º 3
0
        public void Cleanup()
        {
            this.Buffer = null;

            // all these to help the GC...
            dvDisplay.Cleanup();
            dvDisplay = null;
            dvControl.Cleanup();
            dvControl = null;

            Preferences.Proxy.Unsubscribe("Undo.Limited", prefID);
            Preferences.Proxy.Unsubscribe("Undo.Actions", prefID);
            Preferences.Proxy.Unsubscribe("Highlight.PatternMatch", prefID);
            Preferences.Proxy.Unsubscribe("ByteBuffer.TempDir", prefID);
        }