Patch for wxPython leaks

tom@tomseddon.plus.com wrote:

Hello,

This is for C++ programmers embedding Python and wxPython in their application.

I'm using wxPython 2.4.1.2 and Python 2.3.1. I've been mucking about, trying to get wxPython to clean up after itself 100%, and I've got far enough that I feel able to release a first stab at a patch for the source code.

I think the only leaks left are from Python but I'm quite sure these are down to my missing out some detail somewhere. (In particular, upgrading to Python 2.3.1 made no difference.) I'm going to look at these during the coming week or so.

I suppose this is mainly for the attention of Robin Dunn, because I think this could be usefully added to wxPython, but I thought I'd post here so it can be discussed if required. I've only tested it under Windows, and quite apart from that it's very possible I've got something wrong.

Thanks. Unfortunatly I am in the middle of preparing the 2.4.2.x release so I'm a little reluctant to apply this patch right now...

(Much of it feels like a bit of a hack...)

In what way?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

> I'm using wxPython 2.4.1.2 and Python 2.3.1. I've been mucking about,
> trying to get wxPython to clean up after itself 100%, and I've got
> far enough that I feel able to release a first stab at a patch for
> the source code.
>

(...)

> (Much of it feels like a bit of a hack...)

In what way?

After letting it settle for a week and checking again, actually it
doesn't look so bad. (New semantics of SWIG_newvarlink return value
notwithstanding.) I think the "hack" bit was just my gut response to
having to use malloc/free again rather than std::vector :slight_smile:

--Tom

···

On 29 Sep 2003 at 15:10, Robin Dunn wrote:

tom@tomseddon.plus.com wrote: