[C++-sig] Memory issues

David Sveningsson ext at sidvind.com
Tue Mar 6 09:36:40 CET 2007


Paul Guse skrev:
> Hello. I have a few boost::python issues I need help with .
>  
> Firstly, I'm getting some memory leaks by just including the boost
> libraries. (Dynamically linked dll, VS2005. Using boost to embed
> python in c++)
> From what I gather this is still an outstanding issue with no, as of
> yet, solution? Is that correct?
>  
> Second, this is also causing some issues as I need to free the
> resources allocated during the running of scripts. Specifically, I'm
> using the intrusive_ptr to wrap my own object's reference counting.
> When these objects are referenced in a python script the reference
> count is incremented, but not decremented when the script ends. As
> expected, this is causing some issues.
> Is there a way to clean up the variables allocated in a namespace? Or
> to effectively clear the main namespace?
>  
> Thanks.
> Paul
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>   
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

-- 


//*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