On 18/03/11 10.40, Mark Dootson wrote:

  Hi,

Thought I'd rework and get it right I think.
>
New patch attached implements option 2 as intended.
Existing m_self used if available;

Also, implemented

wxPli_create_virtual_evthandler

which takes an extra param - bool forcevirtual

If I read the code correctly, forcevirtual is always false; is it there just in case or is there a real need for it in current code?

wxPli_create_evthandler is now just a wrapper for this and always passes
'false'.

Intended use is for long implemented virtual classes like
wxScrolledWindow that don't have class names Wx::Pl....

Also implemented wxPli_get_selfref to avoid duplicating code, but I
don't think it saved much

For binary compatibility, functions must be added at the end of struct wxPliHelpers.

Builds and works OK for me on all my platforms. Creating virtual classes
in a loop does not seem to leak memory - but I don't have the tools to
prove. Going by my prior failed attempts at fixing this, if I've got the
ref counts wrong somewhere I'd get problems in the tests.

  FWIW, all the refcounting looks good to me.

  Please fix indentation to use spaces before applying! :-)

Thanks!
Mattia

Reply via email to