We hold onto Entity objects in the empty table (id 0). We ideally wouldn't do this to allow the objects to be reclaimed by the VM, and we don't recycle them anyway. They can be dropped once an entity has been spawned in their place, but if you spawn a bunch of entities and no longer need that many, you'll have an array of objects that will never be cleaned up.
Either Entity instances should be recycled (a breaking change), or we should allow them to be dropped.
Description
We hold onto
Entity
objects in the empty table (id 0). We ideally wouldn't do this to allow the objects to be reclaimed by the VM, and we don't recycle them anyway. They can be dropped once an entity has been spawned in their place, but if you spawn a bunch of entities and no longer need that many, you'll have an array of objects that will never be cleaned up.Either
Entity
instances should be recycled (a breaking change), or we should allow them to be dropped.