Thanks that did the trick!

On Mon, Oct 25, 2010 at 7:07 PM, Ralf W. Grosse-Kunstleve <[email protected]>wrote:

> Oh, at second glance...
>
>
>
> > >             object obj = mMainNamespace[ name.c_str()  ];
> > >            obj.del();
>
> This cannot work!
> You need to do it the way I showed before.
>
> mMainNamespace[ name.c_str()  ].del();
>
> The [] operator returns a proxy object which supports the del since
> it still knows what the target object is. Once you've assigned the
> proxy object to boost::python::object the target information is lost.
>
> Ralf
> _______________________________________________
> Cplusplus-sig mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to