>>>>> "Inventor" == Inventor  <[EMAIL PROTECTED]> writes:

Inventor> I think I need to use a destructor in my program.

You need a destructor when your object holds things that need more care to
delete than simply letting the data structure go away.  For example: the
object changes need to be saved to disk, or some temporary files are related
to the object.

If that's not the case, you don't need a DESTROY.

And you never *call* the DESTROY.  Perl calls it when the last reference
has been lost.

Perhaps your program design suffers by having too many globals, and not enough
scope reduction.  Do you have any package variables, or a large number of "my"
variables that live outside all subroutines?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to