Andy Armstrong <andy@hexten.net> writes: > On 5.10 the my ( undef ) = ( $state ) seems to work to force $state to > be destroyed late enough to avoid false positives - but that's a bit > heuristic for my tastes. Is there a reliable way to flush pending > DESTROYs or some other way to guarantee that $state is lives longer > than anything allocated by $block? With no clue as to the internals ... I think what you're doing _should_ work. DESTROY gets called at scope exit if not earlier, so on leaving the $block's scope, all DESTROYs of objects now out of scope will be called – and since you reference $state at a later point, it will need to remain alive, and its DESTROY not yet called. At least, I have assumed it. Silly me? Eirik -- All the books you read and courses you take in college are just there to help you get familiar with the brushes and the canvas. They'll help keep you from making brown blobs, but you'll never make a masterpiece by the book. -- Robert Simpson, mail-archive.com/sqlite-users%40sqlite.org/msg14592.htmlThread Previous | Thread Next