[C++-sig] First time pointers, first crash...

David Abrahams david.abrahams at rcn.com
Tue Feb 19 16:07:23 CET 2002


----- Original Message -----
From: "Stefan Franke" <franke at ableton.com>

> As can be seen from the stack trace in my previous post, the problem
occurs
> at the following point:
>
> [classes.hpp: line 275]
>
> template <class T>
> void class_t<T>::delete_instance(PyObject* obj) const
> {
> delete downcast<T>(obj);
> }
>
> I think this is the location where the wrapper object itself is deleted
> (which shouldn't affect the wrapped object - does it?).

Not the way you're creating it.

> In my example, the wrapper object is created by Boost.Python for the
> return value of the wrapped GetFoo() function.
>
> foo *GetFoo() { return myFoo; }
> [...]
> this_module.def(GetFoo, "getfoo");
>
> My question: Can you point my to the position where the new operator
> for the wrapper object is called. Then I could put a breakpoint there
> and see which allocator is actually used.

line 334 of boost/python/detail/extension_class.hpp






More information about the Cplusplus-sig mailing list