in reply to Memory leaks and circular references
This is leaking since Change 26530.
http://public.activestate.com/cgi-bin/perlbrowse/p/26530:
Change 26530 by nicholas@nicholas-saigo on 2005/12/30 01:08:46 RMAGIC on symbol tables is bad, m'kay. Allow hashes (and therefore all symbol tables) to store the backreference array in the hv_aux structure, and thereby undo the performance damage of 24966, which resulted in 60% of all hash lookups trying to mg_find tiehash magic.
One instance of this in the RT queue of perl: #56908: DBI memory leak
Dave Mitchell commited a change for this: http://public.activestate.com/cgi-bin/perlbrowse/p/34209:
Change 34209 by davem@davem-pigeon on 2008/08/20 23:15:36 perl #56908 DBI memory leak in 5.10.0 due to change 26530 A weakref to a HV would leak, because the xhv_backreferences array is created with a refcount of 2 (to avoid premature freeing during global destruction), but the RC was only decremented once when the parent HV was freed. Also, when thread cloned, the new array was being created with a RC of 1, rather than 2, which coincidentally worked due to the first bug.
but testing this change and trying to wrap it in a good test case is still on my todo list.
(Running it with a blead after Change 34209 shows no leak)
|
|---|