The four points you listed are correct.

When a process dies or exists, all its memory is freed. The same holds true for perl programs, because on the operating system level they are just ordinary programs.

The term "memory leak" refers to the fact that a long running program can use more and more memory, without actually storing more information. This happens when memory is not freed, but the program has no references to that piece of memory.

What happens if it is interrupted?

What do you mean by "interrupted"? The scheduler of a multi tasking operation system interrupts your program many times each second, and resumes it afterwards. But it abstracts that away, the process doesn't "feel" that it has been interrupted.


In reply to Re: Memory and garbage collection by moritz
in thread Memory and garbage collection by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.