Re: [QUESTION] pnotes, Template-Toolkit, and a memory leak

2006-06-30 Thread Philip M. Gollucci
Max Kanat-Alexander wrote: But one way or another, this does seem like a bug. That DESTROY handler ought to get called. By saying go out of scope, or holding a reference, he is implying that the reference count is not = 0 ever. When a "object"'s ref count reaches 0, DESTROY is called.

Re: [QUESTION] pnotes, Template-Toolkit, and a memory leak

2006-06-30 Thread Max Kanat-Alexander
On Fri, 2006-06-30 at 18:49 -0400, Jonathan Vanasco wrote: > I think its more likely that the bug is in the way Bugzilla uses TT > -- a some reference to the template object is getting stored > persistently ( i think everyone has made a similar mistake ). I've > never had a problem with a pn

Re: [QUESTION] pnotes, Template-Toolkit, and a memory leak

2006-06-30 Thread Jonathan Vanasco
On Jun 30, 2006, at 6:20 PM, Max Kanat-Alexander wrote: On Fri, 2006-06-30 at 00:37 -0400, Perrin Harkins wrote: HOWEVER: If I "delete $r->pnotes->{template}" before the script ends, there's no memory leak. It sounds like a problem with the DESTROY method in Template::Provider. Can y

Re: [QUESTION] pnotes, Template-Toolkit, and a memory leak

2006-06-30 Thread Max Kanat-Alexander
On Fri, 2006-06-30 at 00:37 -0400, Perrin Harkins wrote: > > HOWEVER: If I "delete $r->pnotes->{template}" before the script ends, > > there's no memory leak. > > It sounds like a problem with the DESTROY method in Template::Provider. > Can you add some logging to that method to see if it g

Re: [QUESTION] pnotes, Template-Toolkit, and a memory leak

2006-06-29 Thread Perrin Harkins
Max Kanat-Alexander wrote: I store a Template object inside of $r->pnotes(). [...] Every time I reload the script, the process uses an *additional* 512K of RAM, forever, on and on, until my server runs out of memory. HOWEVER: If I "delete $r->pnotes->{template}" before