[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Memory leaking and macperl



At 17.12 1998.04.13, M. Christian Hanson wrote:
>I was under the assumption (very likely incorrectly) that when Perl was
>done executing a script it would dump everything in memory circular
>references and other strange things be damned.  Is this true?  Or do I have
>to be careful to destroy all that I create.

Well, Unix perl has the advantage (in this case) of quitting itslef when it
finishes running its script.  MacPerl stays open (unless you tell it to
close).  If you quit and restarted the MacPerl app, you would regain all of
the lost memory.

That doesn't mean any existing memory leaks should not be fixed, of course.

Anyway, in general, MacPerl should free up all your memory, except for some
things related to Apple Events and GUI toolbox functions, which have to be
manually disposed (with things like AEDisposeDesc($event),
OSADispose($script), $menu->dispose(), etc.).

Hope this helps,

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch