Bad wxSingleInstanceChecker example in help file

Vadim Zeitlin vadim at wxwidgets.org
Sat Oct 27 10:58:26 PDT 2007


On Mon, 22 Oct 2007 15:41:48 +0200 (CEST) koen at vermeer.tv wrote:

> 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.

 Thanks, fixed (in the trunk).

> 2. OnExit() should return the value of the base class' member function. In
> the example, it returns 0.

 It doesn't really matter as the base class version always returns 0 and
probably always will and this isn't really relevant for this example
anyhow.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list