Fixed memory leak in ECS.
This commit is contained in:
parent
25e51f9aea
commit
ecff349a31
1 changed files with 2 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ pub const Human = struct {
|
||||||
speed: components.Speed,
|
speed: components.Speed,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO(ernesto): Move pool to its own file
|
||||||
pub const Pool = struct {
|
pub const Pool = struct {
|
||||||
humans: std.MultiArrayList(Human),
|
humans: std.MultiArrayList(Human),
|
||||||
resources: Resources,
|
resources: Resources,
|
||||||
|
|
@ -64,6 +65,7 @@ pub const Pool = struct {
|
||||||
self.humans.deinit(self.allocator);
|
self.humans.deinit(self.allocator);
|
||||||
|
|
||||||
self.system_groups.deinit();
|
self.system_groups.deinit();
|
||||||
|
self.sync_groups.deinit();
|
||||||
self.thread_pool.deinit();
|
self.thread_pool.deinit();
|
||||||
self.allocator.destroy(self.thread_pool);
|
self.allocator.destroy(self.thread_pool);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue