[C++-sig] Pointer ownership

Tim Spens t_spens at yahoo.com
Mon Aug 6 17:59:11 CEST 2007

I have a constructor that takes a pointer as an
argument.  When I create an instance of this class and
the object looses scope in python I get an error
glibc detected python: free(): invalid pointer:

The class wrapper looks like this
class_<z_command, bases<command>,
boost::noncopyable>("z_command", init<std::string
const &, p *>());

Do I need a call policy for this pointer?  I've looked
at the boost python call policies and found nothing
for constructors with pointers as arguments.

Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search

More information about the Cplusplus-sig mailing list