Boost logo

Boost :

From: Tanguy Fautre (tanguy.fautre_at_[hidden])
Date: 2006-07-03 08:51:56


David Abrahams wrote:
> Tanguy Fautre <tanguy.fautre_at_[hidden]> writes:
>
>> I've been assessing and learning boost.python (1.33.1). But when I add
>> memory leak detection to a small test program (cf. attachment), I
>> found tons of memory leaks (about 20 leaks).
>>
>> [...]
>>
>> Am I doing something wrong? Or is this a bug in boost.python?
>
> Py_Finalize isn't supported by Boost.Python, as
> http://www.boost.org/libs/python/todo.html#pyfinalize-safety explains.
> That should also explain the "leaks" you are seeing.
>

Thanks for the tip.

I must say I was surprised to see so many memory leak alerts caused by
Boost; to the point I was doubting I was doing anything correctly. Not
very clean :-\

"In order to make it safe to call PyFinalize() we must register an
atexit routine which destroys these objects and releases all Python
reference counts so that Python can clean them up while there's still an
interpreter. Dirk Gerrits has promised to do this job." (from above URL)

Is this idea still alive and being implemented?

Tanguy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk