Re: [C++-sig] boost python memoryleak

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: [C++-sig] boost python memoryleak

David Abrahams
Johann Obermayr <[hidden email]> writes:

> Hello,
> We have found a memory leak in the boost python.
> And we solved it with this.
> boost\python\converter\registrations.hpp
> struct BOOST_PYTHON_DECL registration
> {
> public: // member functions
>    explicit registration(type_info);
>    ~registration();            // <---- add this
> }
> // and add this to registrations.hpp
> inline registration::~registration()
> {
>    delete lvalue_chain;
>    delete rvalue_chain;
> }
> Please can you add this for next relase.

Since Boost support is my profession, I do not accept requests for
free support at my personal email; I hope you understand.  Please post
to the appropriate mailing list

Boost.Python leaks many things from that point-of-view; it is not
compatible with PyFinalize.  Until that gets fixed there's no point in
trying to clean up things like this.  Also, your change doesn't
properly clean up the remainder of the chains, so it wouldn't be the
right one to make even if it were appropriate to try to fix it.

Dave Abrahams
Boost Consulting
C++-sig mailing list
[hidden email]