Been going round in circles here for a few hours now. I have a main game object which simply refuses to be collected when I go back to the front end of the app. All of the sub-objects are using newproxy so I can tell if they are being collected, e.g.:
<pre>
self.proxy = newproxy(true)
getmetatable(self.proxy).__gc = function() print("GameSpace has been collected") end |
And every single one of them is being collected. I'm also forcing the removal of any remaining children from the game class just on the off chance but I still cannot get it to be collected as garbage at all. I'm stopping all timers, removing all events - basically doing everything I feel I should.
Does anybody have any other tips for tracking why an object is refusing to put itself up for collection? Going a bit mad here now. Normally I can get to the bottom of it quite quickly but not this time, I'm stumped.
Comments