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

Re: [MacPerl] Memory problems in OO context



Brian,

[quotes snipped]

>|...I don't see how I could possibly free up more memory. Am I doing
>|something wrong here?
>
>Yes. As Gisle's note says, you have to *explicitly* delete the html parse
>tree. Just undefing it doesn't do it, that's *implicitly* deleting it,
>which doesn't work because of circular references. Replace the undef $html
>with $html->delete and see if that changes the behavior at all. (And yes, I
>think that could be stated more clearly in the HTML pods.)

Yes, this works like a charm. There is still some memory loss in the realm
of an estimated 10K per iteration, but with this tiny change I was able to
drop the whole bunch of about a hundred files on the droplet with out
making MacPerl crash on me for lack of free memory. (Hobby programmers like
me should be prohibited from tackeling OO stuff....)

Thanks for the great advice!

Peter


__Peter Hartmann ________

mailto:hphartmann@arcormail.de



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org