Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
After reading Does Perl have garbage collection mechanism and how it performs?, I began to wonder how useful it would be to modify my Perl installation to free memory after a refcount hits 0.

You see, I've written a Perl application that I distribute for both Linux and Win32. My Win32 distros include a copy of perl58.dll, since most of my Win32 users don't have Perl installed (or have any desire to install it).

The trouble is that at least two of my users have seen the large amounts of memory my app can use (sometimes up to 28MB - I assume that my usage of Tk and Tk::Photo in particular are part of the problem) and subsequently refused to use my app, insisting that it had memory leaks. I tried to explain that most of that memory gets swapped out to disk anyway, but it was in vain.

So if I modified the Perl source to free its memory after a reference goes out of scope and distributed the recompiled DLL, would that lower my app's memory usage and appease these users?

(Please don't flame me - this is just an idea :)


In reply to make perl release memory by batkins

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2018-06-24 21:02 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (126 votes). Check out past polls.