Loading ...
Sorry, an error occurred while loading the content.

Perl Garbage Collector

Expand Messages
  • joshypy
    Dear Friends, Anybody has any idea about the Perl Garbage Collector. Give me Some tips to know and how to implement it in programs. I hope it helps in clearing
    Message 1 of 2 , Apr 4 9:53 PM
    • 0 Attachment
      Dear Friends,

      Anybody has any idea about the Perl Garbage Collector. Give me Some
      tips to know and how to implement it in programs. I hope it helps in
      clearing the memory while the program is running.


      Joshy
    • merlyn@stonehenge.com
      ... joshypy Anybody has any idea about the Perl Garbage Collector. Give me Some joshypy tips to know and how to implement it in programs. I hope it helps in
      Message 2 of 2 , Apr 4 11:48 PM
      • 0 Attachment
        >>>>> "joshypy" == joshypy <joshypy@...> writes:

        joshypy> Anybody has any idea about the Perl Garbage Collector. Give me Some
        joshypy> tips to know and how to implement it in programs. I hope it helps in
        joshypy> clearing the memory while the program is running.

        Perl doesn't have a garbage collector. It uses reference counting. In
        general, you won't have to worry about it, because Perl automatically reuses
        any memory no longer being used by your variables. Under rare circumstances,
        you can create memory structures (using self-referential references) that
        might leak memory, but if you need such structures, you can use Weak
        references instead and still get nearly all the functionality you need.

        --
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
        <merlyn@...> <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!
      Your message has been successfully submitted and would be delivered to recipients shortly.