in reply to unit-testing garbage collection with Moose
Without seeing the code for Y it would be hard to know exactly what is going wrong here. But I suspect that Y is being made immutable, which means Moose is compiling an inlined DESTROY method at compile time. So when you override DEMOLISH at runtime it is too late.
Also, take a look at Test::Memory::Cycle, it will make your life easier for this stuff.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: unit-testing garbage collection with Moose
by morgon (Priest) on Jul 01, 2009 at 12:01 UTC |