ISAI student has asked for the wisdom of the Perl Monks concerning the following question:
I have a general question, I will pose the scenario, and then the question:
If I create an array X, I take up memory. I am to erase it (by setting it's $# to -1), and then I will create a new array, named Y, which is slightly smaller than X. Now the question: Will Perl use the memory freed from array X in order to store array Y, or allocate s different portion of memory for array Y?.
basically what I am asking if there is any reason, from memory usage point of view, to use $#=-1?
Thanks,
-ISAI student
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: memory "release" with $#=-1
by dave_the_m (Monsignor) on Jun 28, 2005 at 09:55 UTC | |
by ISAI student (Scribe) on Jun 28, 2005 at 11:00 UTC | |
by dave_the_m (Monsignor) on Jun 28, 2005 at 12:15 UTC | |
by ISAI student (Scribe) on Jun 28, 2005 at 14:01 UTC | |
by waswas-fng (Curate) on Jun 28, 2005 at 19:22 UTC | |
by BUU (Prior) on Jun 28, 2005 at 19:31 UTC | |
Re: memory "release" with $#=-1
by fmerges (Chaplain) on Jun 28, 2005 at 09:35 UTC | |
Re: memory "release" with $#=-1
by tlm (Prior) on Jun 28, 2005 at 09:45 UTC | |
by ikegami (Patriarch) on Jun 28, 2005 at 15:33 UTC | |
Re: memory "release" with $#=-1
by eXile (Priest) on Jun 28, 2005 at 16:05 UTC |
Back to
Seekers of Perl Wisdom