in reply to Closures, object destruction and memory leaks
What you describe should work, but I know that there was a bug in some versions of Perl (sorry, I couldn't seem to track it down, nor do I have them to test, but I am pretty sure that Perl 5.005_03 was one of them) where closures like that would never get garbage collected because of a Perl bug.
I would suggest trying the above with a $req with a DESTROY method that tells you when it goes away. See if it is a problem. If it is, then there isn't much you can do about it other than clean up $req yourself and hope that the memory leak doesn't grow too fast.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Closures, object destruction and memory leaks
by mpeppler (Vicar) on Nov 11, 2003 at 01:19 UTC | |
by tilly (Archbishop) on Nov 11, 2003 at 01:54 UTC | |
by mpeppler (Vicar) on Nov 11, 2003 at 15:42 UTC | |
by tilly (Archbishop) on Nov 11, 2003 at 16:11 UTC | |
by mpeppler (Vicar) on Nov 11, 2003 at 16:18 UTC | |
|
Re: Re: Closures, object destruction and memory leaks
by demerphq (Chancellor) on Nov 10, 2003 at 16:15 UTC | |
by tilly (Archbishop) on Nov 10, 2003 at 18:27 UTC |