This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
threads: $#shared = N should destroy
authorDavid Mitchell <davem@iabyn.com>
Tue, 14 Oct 2014 11:26:13 +0000 (12:26 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 14 Oct 2014 11:33:07 +0000 (12:33 +0100)
commit76eea786714b283ffd7e4f7b662ec945fd97db68
tree01577eafc7df12b58e1d158ee9ec376831c5b409
parent399547d72ff67024bd23426fc6e6aa2593d47a9e
threads: $#shared = N should destroy

When shrinking a shared array by setting $#shared = N,
any freed elements should trigger destructors if they are objects,
but they weren't.

This commit extends the work done by 7d585d2f3001 (which created tmp
proxys when abandoning elements of arrays and hashes) to the STORESIZE
method, which is what is triggered by $#a assignment (and indirectly by
undef @a).
dist/threads-shared/shared.xs
dist/threads-shared/t/object2.t