in reply to Can I use the OO DESTROY method ... for a good cause
Keep in mind that I'm fairly new to Perl myself, but...
...from what I know, the best course of action is to simply let the garbage collector do its work. Declare $MIMEobject as a lexical variable inside your if() { ... } block; once it goes out of scope and once there are no references to it anymore, the garbage collector will automatically reclaim it. There's no need to explicitely call DESTROY.
If you want to release it ASAP, you could also undef it.
May the more enlightened monks correct me if I'm wrong!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can I use the OO DESTROY method ... for a good cause
by kennethk (Abbot) on Jul 22, 2014 at 21:53 UTC | |
by Your Mother (Archbishop) on Jul 22, 2014 at 22:00 UTC |