[omniORB] nil object destruction

S. Sahayaraj ssahayaraj@quark.co.in
Fri Feb 7 09:40:02 2003


One more work around,
	Instead of to not call orb->destroy(), Can we skip to destruct each
nil object in the container?. 

	Because, Anyway underlying OS takes care of destructing all unused
resources while exit. but we should place the code to destroy the container
of nil objects.

	I meant to say the following code has to be deleted from
omniInternal.cc.  But I'm not sure whether its proper fix or right way.

	 Duncan, Please give your advise.

/*
  omnivector<CORBA::Object_ptr>::iterator i = nilObjectList()->begin();
  for (; i != nilObjectList()->end(); i++, nils++)
		delete *i;
*/

  delete nilObjectList();  // It must be placed here.

  Renzo, could you try with these changes and let me know.



Thanks
Sahay.

-----Original Message-----
From: Duncan Grisby [mailto:duncan@grisby.org]
Sent: Wednesday, February 05, 2003 10:30 PM
To: Renzo Tomaselli
Cc: Omniorb list
Subject: Re: [omniORB] nil object destruction 


On Monday 3 February, "Renzo Tomaselli" wrote:

> This strategy does not work when any of such nils belongs to a dynamic
> service which has been discarded from memory because of a shutdown
procedure
> or because it was discarded on demand during process lifecycle: then the
nil
> points to garbage, and an access violation is granted for sure.
> Can anyone comment on that ? Thanks,

That is indeed a problem. I can't think of any easy way around it,
other than to not call orb->destroy(). If you don't destroy the ORB,
things like the nils are not cleaned up. It isn't possible to
reference count the nils since the C++ mapping says you don't need
to. I'm open to any other suggestions...

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --
_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list