You have to have all references to the object go out of scope. You can help this along by undefing the object reference.
Perl's garbage collection system uses reference counts--so when nothing points to a piece of data, it can be garbage collected. Note that I said can. AFAIK, there is no way to force the issue.
Check out this note in the perlobj document. Scroll up a bit to read the section on destructors. You might find it interesting, too.
TGI says moo
In reply to Re: Re: DESTROYing an object
by TGI
in thread DESTROYing an object
by batkins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |