This commit is contained in:
FlightControl
2016-12-13 10:24:19 +01:00
parent 15134d7f4e
commit e5b386b9e5
3 changed files with 172 additions and 55 deletions

View File

@@ -124,11 +124,15 @@ end
function BASE:_Destructor()
--self:E("_Destructor")
self:EventRemoveAll()
--self:EventRemoveAll()
end
function BASE:_SetDestructor()
-- TODO: Okay, this is really technical...
-- When you set a proxy to a table to catch __gc, weak tables don't behave like weak...
-- Therefore, I am parking this logic until I've properly discussed all this with the community.
--[[
local proxy = newproxy(true)
local proxyMeta = getmetatable(proxy)
@@ -143,7 +147,7 @@ function BASE:_SetDestructor()
-- table is about to be garbage-collected - then the __gc hook
-- will be invoked and the destructor called
rawset( self, '__proxy', proxy )
--]]
end
--- This is the worker method to inherit from a parent class.