public virtual void Close() {
#if LANGTRACE
            Trace.WriteLine("ViewFilter::Close");
#endif
            if (this.expansionEvents != null) {
                expansionEvents.Dispose();
                expansionEvents = null;
            }
            if (textViewEvents != null) {
                textViewEvents.Dispose();
                textViewEvents = null;
            }

            if (textView == this.service.LastActiveTextView)
                this.service.OnActiveViewChanged(null);

            textView.RemoveCommandFilter(this); // do not care about HRESULT.
            if (textTipData != null) {
                textTipData.Close(textView);
                textTipData = null;
            }

            Dispose();
        }
 public virtual void Dispose() {
     this.textView = null;
     this.service = null;
     this.nextTarget = null;
     this.textTipData = null;
     this.mgr = null;
     if (this.pvaChar != IntPtr.Zero) {
         Marshal.FreeCoTaskMem(pvaChar);
         pvaChar = IntPtr.Zero;
     }
     GC.SuppressFinalize(this); // REVIEW: Why this?
 }