I was testing on mobile and it started to jitter and lag.
Profiler shows, with collection factories, Lua.refs kept increasing and so does memory.
To reproduce:
local pos = vmath.vector3(0, 0, 0)
function update(self, dt)
-- Simple collection with single, empty game object
local id = collectionfactory.create("#collectionfactory", pos)
go.delete_all(id)
-- Creating the same object with factory do not leak memory
--local id = factory.create("#factory", pos)
--go.delete(id)
end
Game Object factory does not have this problem.