Re: [C++-sig] PyObject RefCount

2008-12-03 Thread Stefan Seefeld
Renato Araujo wrote: Thanks for your points, I will try explain my problem better: In my library I have a parent->child control then when the parent is deleted all children is deleted too. but in python I would like change this behavior, if there is some python object using my child I will not

Re: [C++-sig] PyObject RefCount

2008-12-03 Thread Renato Araujo
Thanks for your points, I will try explain my problem better: In my library I have a parent->child control then when the parent is deleted all children is deleted too. but in python I would like change this behavior, if there is some python object using my child I will not delete this object. Th

Re: [C++-sig] PyObject RefCount

2008-12-03 Thread Stefan Seefeld
Renato Araujo wrote: Hi all, I'm trying check if have someone using my object in python, but I got some problems I think I'm not doing this in the correct way: First of all, I'm not sure I understand what you are trying to achieve. Why do you want to manually delete reference-counted object

[C++-sig] PyObject RefCount

2008-12-03 Thread Renato Araujo
Hi all, I'm trying check if have someone using my object in python, but I got some problems I think I'm not doing this in the correct way: I have a function like that: voi MyClass::~MyClass() { for(int i=0; i < childCount(); i++) { BaseClass *child = child_at(i); python