Hi Aaron, I don't have a test case involving Apache::Session yet (I've been out of town for a couple days), but here's a simple one in Perl that demonstrates the DESTROY order problem:
-------------------------------------------------------------- #!/usr/bin/perl { package Outer; sub new { bless {inner => 'Inner'->new} } sub DESTROY { warn "Destroying $_[0]" } } { package Inner; sub new { bless {} } sub DESTROY { warn "Destroying $_[0]" } } { warn "refcount destruction:\n"; my $foo = 'Outer'->new; } warn "\nglobal destruction:\n"; my $bar = 'Outer'->new; $bar->{self} = $bar; -------------------------------------------------------------- So I think I need to find out why the Apache::Session objects aren't being destroyed until global destruction time, i.e. why their refcounts aren't going to zero. This is in the context of testing the new HTML::Mason 1.10, so something complicated might be happening with that too. -Ken On Wednesday, January 2, 2002, at 04:15 AM, Aaron E. Ross wrote: >> refcount destruction. I've declared %session as a locally-scoped >> variable, so it should evaporate before global destruction, unless it's >> got circular data structures or something. Anyone know what might be >> going on? > > Do you have a simple case we can test yet?