Re: [PBML] memory collection
- jiqiang yao wrote:
> Hi,And what is the URL where you posted your code?
> I have five subroutines in a script.
> However, if I call them one by one in order, I have
> memory problem. Instead, I call the first subroutine
> then exit the script. Next, I run the script only
> calling the 2nd subroutine and so on. It works fine.
> As you know, I have to run the script five times in
> order for all the subroutines to be done.
> My question, how can I run the five subroutines one by
> one at once? how do I claim the memory allocated to
> each subroutine?
Just my 0.00000002 million dollars worth,
"For the things we have to learn before we can do them, we learn by doing them."
>>>>> "jiqiang" == jiqiang yao <jiqiang123@...> writes:jiqiang> However, if I call them one by one in order, I have
jiqiang> memory problem. Instead, I call the first subroutine
jiqiang> then exit the script. Next, I run the script only
jiqiang> calling the 2nd subroutine and so on. It works fine.
Sounds like you're using package (global) variables and not cleaning them up.
Are you using "my" (lexical) variables defined within each subroutine only?
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!