Re: [Orbit-python-list] Crash with ORB_init() / del() in 0.3.1
Status: Inactive
Brought to you by:
tack
From: Johan D. <jd...@te...> - 2001-11-15 16:41:19
|
tor 2001-11-15 klockan 15.23 skrev Jason Tackaberry: > > <markmc> kiko, I think in ORBit, ORBit_init didn't do a > > CORBA_Object_duplicate on the existing ORB before returning it, so you > > would only be allowed to release it once > > This is the problem. > > So, as we discussed on IRC, add the CORBA_Object_duplicate call to > CORBA_ORB_PyObject__new and leave the CORBA_Object_release call in the > destructor. This is better than just removing CORBA_Object_release() > since it's more consistent with refcounting. (i.e. we grab a ref to the > ORB in the constructor and release the reference in the destructor, as > opposed to borrowing the ref from ORBit.) > > > <markmc> kiko, I remember Michael talking about this recently.... > > <markmc> kiko, its different in ORBit2 > > Keep that in mind, Johan. :) > > > a) Make the ORB a special object, so it's release is just a dummy release > > and it only gets cleaned up by Python on exit (no big deal IMHO but this > > isn't really fixing it). > > The ORB is already a separate type object. So the fix is trivial. > > Jason. > > -- > Academic Computing Support Specialist Assistant Section Editor > Algoma University College http://linux.com/develop > Sault Ste. Marie, Ontario > 705-949-2301 x330 Personal Home Page > http://www.auc.ca http://sault.org > > > _______________________________________________ > Orbit-python-list mailing list > Orb...@li... > https://lists.sourceforge.net/lists/listinfo/orbit-python-list >>> import CORBA >>> for i in range (50): ... orb = CORBA.ORB_init () ... del orb ... Works perfectly in ORBit2 port. (without duplicating the orb) --- Johan Dahlin |