in reply to Re: explicitly calling destructor
in thread explicitly calling destructor
Why? Why is it better to have a clean_up() method that DESTROY() calls instead of just a DESTROY() method?
It seems like it potentially makes things more fragile, since it implies that clean_up() can occur independently of destruction, which is not the case. That's precisely the concern -- I don't want to release the resource while there are still active objects.
Yes, I could add a flag to disable the object after clean_up, and modify all methods to inspect it, but that doesn't require a separate clean_up() method, so what does it actually accomplish?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: explicitly calling destructor
by hossman (Prior) on May 16, 2003 at 06:50 UTC | |
by mla (Beadle) on May 16, 2003 at 07:55 UTC | |
by edoc (Chaplain) on May 16, 2003 at 13:30 UTC | |
by diotalevi (Canon) on May 16, 2003 at 13:35 UTC | |
by edoc (Chaplain) on May 16, 2003 at 13:48 UTC | |
by LanceDeeply (Chaplain) on May 16, 2003 at 18:09 UTC |