On 05/01/2013 11:27 AM, Lorenzo Marcantonio wrote:
> On Wed, May 01, 2013 at 05:38:48PM +0200, Miguel Angel Ajo wrote:
>> If the object is obtained via GetBoard() , it won't be deleted by python
>> because he doesn't own it.
> 
> Yes but *nothing* prevents C++ to delete an object which is 'held' (not
> created) by python (that's the reason for python being best extended: it
> like to manage objects itself). AFAIK at the moment all the object are
> created and delete from the C++ side only so python has objects
> disappearing under its feet.


Can you back this up please with either an example or a web reference.


BTW, Java <-> C/C++ does not behave this way.  The term "object" should 
probably clarified
before we go too much further.  Both python and java languages use handles 
a.k.a.
references, so you have a layer of indirection to protect against "bad things" 
from happening.

When you "delete an object" in C++ this merely triggers some activity at the 
holder of the
true end object.

I was the 2nd person in the world to write a full Java virtual machine, 
probably the first
to do it alone, complete with JNI, so let there be no doubt about my 
comprehension there.
 Mine was on the market well before Microsoft learned their $20,000,000 lesson 
about
contract law.  I could have saved them a lot of money.




Dick



_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to