Bad wxSingleInstanceChecker example in help file

koen at vermeer.tv koen at vermeer.tv
Mon Oct 22 06:41:48 PDT 2007


Hi,

I just took a look at the example given in the help on
wxSingleInstanceCheck (wxWidgets 2.8.5) and it seems to contain (at least)
two bugs and/or inconsistencies with other parts of the help.

1. If OnInit() returns false, OnExit() isn't called. Hence, m_checker
isn't deleted, and memory is leaked.
2. OnExit() should return the value of the base class' member function. In
the example, it returns 0.

Best,
Koen





More information about the wx-users mailing list