// Protected implementation of Dispose pattern. protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { wb.Dispose(); wb = null; scrollWindow.Destroy(); } // Free any unmanaged objects here. // disposed = true; }