// We override the destructor with our custom code // because we have a list, which we need to clear. protected override void Dispose(bool disposing) { if (!disposed) { // Clean up other resources, // done by the base-destructor base.Dispose(disposing); if (items != null) { items.Clear(); items = null; disposed = true; } } }
// Creates an empty intellisense public Intellisense() { this.items = new AutoCompleteWordCollection(); this.disposed = false; }