On Tue, May 28, 2013 at 05:28:06PM +0100, Nicholas Clark wrote: > On Tue, May 28, 2013 at 06:23:26PM +0200, Leon Timmermans wrote: > > On Tue, May 28, 2013 at 6:17 PM, Nicholas Clark <nick@ccl4.org> wrote: > > > I'm not sure how much sanity it will cost to refactor this. > > > > One fix that doesn't require too much refactoring may be to move it > > from a DESTROY method to free magic. Those are run much later. > > Yes, that feels like a good start. I wonder if doing that is enough to > make Storable reliable during global destruction. The cause of the bug seems > to be solely that the thing that its context points to is getting wiped > during object destruction, rather than after it. I think it just might be. It's done on smoke-me/nicholas/Storable with Reini's test case added. Test case fails without the change, passes with it. A superficial test with valgrind suggests that nothing is leaking. I've only pushed this to see what breaks. There's still the ChangeLog to update and I'm not sure what else. Nicholas ClarkThread Previous | Thread Next