further to my previous mail
Matthew Newhook
matthew_newhook@stratos.ca
Thu, 26 Jun 1997 16:27:44 -0230
Hi,
bug #3
deadlock in object deletion.
the patch I sent didn't deal with all cases. In the process of
fixing this bug I fixed another problem with BOA::dispose.
This method doesn't work as documented. In fact the implementation
in 2.2.0 corrupts the object table if called with a reference count of
1. This patch fixes these two problems. Apply this patch over
a clean objectRef.cc.
RCS file: RCS/objectRef.cc,v
retrieving revision 1.1
diff -r1.1 objectRef.cc
223a224
> omniObject* toDelete = 0;
234c235
< delete obj;
---
> toDelete = obj;
246c247
< delete obj; // call dtor if BOA->disposed() has been called.
---
> toDelete = obj;
249a251,252
> if (toDelete != 0)
> delete toDelete; // call dtor if BOA->disposed() has been called.
259,264d261
< if (obj->getRefCount() <= 0) {
< omniObject::objectTableLock.unlock();
< throw CORBA::INV_OBJREF(0,CORBA::COMPLETED_NO);
< }
< else
< obj->setRefCount(obj->getRefCount()-1);
265a263
> omniObject* toDelete = 0;
268c266
< delete obj;
---
> toDelete = obj;
273a272,273
> if (toDelete != 0)
> delete toDelete;
Matthew
--
Matthew Newhook. matthew_newhook@stratos.ca, http://www.engr.mun.ca/~matthew
Software Designer, Stratos Network Research.
w: (709) 364-5950, h: (709)-745-4346