[C++-sig] Memory issues

Paul Guse paul at mustagh.com
Thu Mar 8 18:12:49 CET 2007


David wrote:
>>
> Hi, did you make any progress? I have the same problem, it seems like
> the release function is never called when python destroys the
> references. Even setting a variable to None does not call the release
> function.
>
> The problem does not seems to be specific to a compiler since I'm having
> these issues with gcc4 on GNU/Linux and also tried compiling with VS2005
>

I haven't made any progress on the eliminating the memory leak but have 
accepted that it is a known one time memory deallocation problem. Which is 
important as it's not technically a leak as it doesn't continuously leak or 
grow with time. It's not pretty to see a dump at the end of a debug session, 
but it seems worth the trade off.

As for the other issue I was having with intrusive pointers, I am now using 
a copy of the main module dictionary for all script runs. At the end of each 
run I clear and destroy the dictionary copy so all memory from it gets 
freed.

Paul




>
>
> //*David Sveningsson [eXt]*
>
> Freelance coder | Game Development Student
> http://sidvind.com
>
> Thou shalt make thy program's purpose and structure clear to thy fellow 
> man by using the One True Brace Style, even if thou likest it not, for thy 
> creativity is better used in solving problems than in creating beautiful 
> new impediments to understanding.
> > 




More information about the Cplusplus-sig mailing list