[C++-sig] Memory leak when using return_internal_reference !?
by gideon may other posts by this author
Jun 4 2003 6:07PM messages near this date
[C++-sig] Building Boost.Python on MingW(win98)
|
[C++-sig] Re: Memory leak when using return_internal_reference !?
Hi Dave,
I'm experiencing a memory leak when using the return_internal_reference
policy.
It's probably best explained using the the test_pointer_adoption_ext module
and a
little test program :
----------- leak.py -----------------
from test_pointer_adoption_ext import *
a = create("leak")
while 1:
innards = a.get_inner()
innards = None
print ".",
--------------------------------------
When running this program, there is a serious memory leak. When I take out
the line 'innards = a.get_inner()' everything is OK.
I tried to hunt it down and it seems that life_support system created
in life_support.cpp is never deleted, i.e. life_support_dealloc is never
called.
Do you have any idea what could be the problem ?
I'm using return_internal_reference quite extensively and couldn't live
without it :-)
ciao,
gideon
_______________________________________________
C++-sig mailing list
C++-sig@[...].org
http://mail.python.org/mailman/listinfo/c++-sig
Thread:
gideon may
David Abrahams
David Abrahams
gideon may
|