in reply to Re: nested subs cause DESTROY block to not get hit
in thread nested subs cause DESTROY block to not get hit
Unlike C++, an object destructor is nearly never needed in Perl, and even when it is, explicit invocation is uncalled for. In the case of our Person class, we don't need a destructor because Perl takes care of simple matters like memory deallocation.I quite disagree. GC is great for memory, but doesn't do a thing for other resources such as window handles. If an object represents a window, the object being destructed closes the window. Do you want the window to stay visible until the system notices it can collect it, or promptly when the last reference is dropped?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: nested subs cause DESTROY block to not get hit
by Monky Python (Scribe) on Aug 17, 2001 at 01:25 UTC |