The autocomplete window in Scintilla is created each time but not destroyed.
Sorry, but I can't argee with that.
Here's how ListBox is created:
void AutoComplete::Start(Window &parent, int ctrlID,
int position, Point location, int startLen_,
int lineHeight, bool unicodeMode, int technology) {
/* C::B begin */
// if (active) {
// Cancel();
// }
/* C::B end */
lb->Create(parent, ctrlID, location, lineHeight, unicodeMode, technology);
lb->Clear();
"lb->clear" calls ListBoxImpl::Create, here is part of it's implementation:
/* C::B begin */
if (wid == 0)
wid = new wxSCIListBoxWin(GETWIN(parent.GetID()), ctrlID, location_);
else if (GETLBW(wid)->GetParent() != GETWIN(parent.GetID()))
GETLBW(wid)->Reparent(GETWIN(parent.GetID()));
GETLBW(wid)->SetPosition(wxPoint(location_.x,location_.y));
GETLBW(wid)->SetId(ctrlID);
GETLB(wid)->SetId(ctrlID);
/* C::B end */
If window wasn't destroyed it will be reused.
At first I thought "How could I make so horrible mistake", but I look deeper into code and it's not so bad