in reply to Re: sub DESTROY: Strange ordering of object destruction
in thread sub DESTROY: Strange ordering of object destruction (SOLVED)
Code reduction is certainly the gold standard but in this case the class is very complicated and doing it right would take some time. I posted because I was looking for background knowledge or experience with DESTROY that might explain the situation and allow me to avoid that, or at least, ensure that I was checking for the right things when I parred away code.
In this case, asking first proved quite fruitful. First, confirmed my suspicion that objects are deleted in indeterminant order during global destruction. Secondly, it caused me to question my assertion that destruction was in fact happening before the global destruction phase.
Had I reduced the code first, I would have been using inadequate tools to determine the order of destruction, and so my reduced code, for all the work it would have caused, would not have provided any more information than the more complex code.
Had the consensus been that there was likely a bug, I most certainly would have gone the code reduction route, if only to produce a repeatable test case. A bug report without a test case is the pits.