[omniORB] nil object destruction
Duncan Grisby
duncan@grisby.org
Wed Feb 12 11:16:00 2003
On Tuesday 11 February, Malge Nishant wrote:
> for (; i != nilObjectList()->end(); i++, nils++)
> {
> try
> {
> delete *i;
> }
> catch(...)
> {
> }
> }
>
> This is surely better instead of letting OS to clear. We will try to clear
> as much as we can and rest is passed on to OS!
The vast majority of platforms will segfault on the delete if it
points to invalid memory, rather than throw an exception, so I don't
think that's a particularly useful solution. Why is it better to clear
up some nils rather than let the OS get all of them? Cleaning up
completely just takes more time than letting the OS clean up the whole
process in one go.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --