mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Dispose Components when EcsWorld gets deleted
This commit is contained in:
@@ -25,19 +25,20 @@ namespace GlitchyEngine.World
|
||||
|
||||
public ~this()
|
||||
{
|
||||
for(var entry in _entities)
|
||||
{
|
||||
DisposeComponents(entry);
|
||||
|
||||
delete entry.ComponentMask;
|
||||
}
|
||||
|
||||
delete _entities;
|
||||
for(var entry in _componentPools)
|
||||
{
|
||||
delete entry.value.Pool;
|
||||
}
|
||||
|
||||
delete _componentPools;
|
||||
|
||||
for(var entry in _entities)
|
||||
{
|
||||
delete entry.ComponentMask;
|
||||
}
|
||||
|
||||
delete _entities;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user