in reply to Adventures in Debugging a Perl/Tk Game
I disagree with some of your analysis. @$av= (); vs. $av= [ ]; only matters if you are leaking references to the original (anonymous) array (such as via circular references). Your "fix" reduces the impact of the leak that makes the unreferenced anonymous array not get destroyed.
But I'm not particularly surprised to find unreferenced things not being destroyed when using Tk. When I've used Tk I've had to be careful to not create a lot of anonymous things because it appeared that Tk was prone to preventing things from being destroyed. Part of this may have been due to the problem of closures causing Perl to create its own circular references but I thought there was more to it than that. But having bugs in ref counting and related stuff is almost assured when you have that volume of XS code.
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adventures in Debugging a Perl/Tk Game (other leak)
by liverpole (Monsignor) on Jan 16, 2008 at 20:35 UTC | |
by tye (Sage) on Jan 17, 2008 at 05:04 UTC |