[Catalyst] Storing $c leaks memory?
Christopher H. Laco
claco at chrislaco.com
Thu Aug 23 14:50:13 GMT 2007
Tobias Kremer wrote:
> While hunting down some memory leaks in my application I found that it's
> generally a bad idea to store $c in a class as this never gets cleared up
> completely, is that correct?
I'd wager circular reference issue. Take a look into ACCEPT_CONTEXT
In short, if you're going to store a copy of $c in your classes, weaken
them first using Scalar::Util::weaken
Of course, I could be full of it. :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070823/76a5=
More information about the Catalyst