in reply to recursive reference delete subroutine
Simply
undef $ref;
should do it for you -- if its referent's reference count drops to zero, its memory will be freed automatically (and so on, recursively.)
Keep in mind, the memory is only freed for reuse by your program, not to the OS, but that shouldn't be hurting you here.
So my guesses would be that either you have a memory leak, or that you just plain don't have enough memory for your current algorithm with the data you're using, and you'll have to be cleverer about the algorithm -- no amount of undeffing or deleting is going to save you.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: recursive reference delete subroutine
by chromatic (Archbishop) on Dec 16, 2004 at 02:43 UTC | |
by Zed_Lopez (Chaplain) on Dec 16, 2004 at 05:30 UTC |
In Section
Seekers of Perl Wisdom