in reply to Re: Re: Re: On timely destruction?
in thread On timely destruction?

We've talked about having some sort of immediate resource registry that would be checked at some defined interval (block exit, sub exit, sub entry, something like that) and trigger a sweep for dead objects if there were any registered. While it's more expensive than truly on-demand collection, it provides some minimum guarantees on the lifetime of potentially transient objects without too much overhead or potential for bugs in the source.

It shouldn't be that bad as far as code goes as usually there's not much in the way of truly contentious resources in use. (Though I suppose some folks might disagre)