[C++-sig] Lifetime of Python object for a pointer argument

Achim Domma achim.domma at syynx.de
Sat Feb 16 17:14:12 CET 2002


Hi,

I'm also not an expert, so hopefully Dave will correct my if I'm wrong. As
far as I know it's in general not an good idea to pass objekts as pointers
in the current version of boost.python, so you should prefer passing
parameters by value.

> // C++ part
> class grid
> {
> public:
>    grid() { ... }
>    ...
> };

Do you allocate dynamic memory in grid ? If yes, is the copy-constructor
implemented ?

greetings
Achim







More information about the Cplusplus-sig mailing list