[boost-users][python] Problem with lifetime of object?

Hello. I would like to know what's wrong with this:
Object * create() { return new Object(); }
void addToScene(const std::string & name, Object * o)
{
//Store object in a std::multimap
obj = Object() addToScene("obj", obj)
Should the problem have anything to do with object lifetime? Or the segmentation fault is because of another issue? Thanks in advance.

On Thu, Aug 27, 2009 at 2:11 AM, Germán Diago
Sorry, there's an error in the python code, I meant:
obj = createObject() addToScene("obj", obj)
Thanks in advance.
I would guess another issue, from just a quick look the lifetime seems fine, but we need to see more of your code to make a better guess.
participants (2)
-
Germán Diago
-
OvermindDL1