This commit is contained in:
Peter Li 2025-07-04 18:18:06 -07:00
parent 39ad2ffd70
commit 943a325ec0
6 changed files with 9 additions and 23633 deletions

View File

@ -33,7 +33,7 @@ pub fn start_module(spec: *core.SpecVariantMap, args: anytype, allocator: std.me
}
pub fn shutdown_module(allocator: std.mem.Allocator) void {
_ = allocator;
gSoundLoader.destroy(allocator);
gSoundEngine.shutdown();
}

View File

@ -42,7 +42,6 @@ pub const SoundLoader = struct {
}
pub fn destroy(self: *@This(), allocator: std.mem.Allocator) void {
self.engine.deinit();
allocator.destroy(self);
}

View File

@ -238,6 +238,11 @@ pub const PhysicsRuntime = struct {
for (PhysicsCharacter.BaseContainer.list.items) |physChar| {
physChar.deinit();
}
var iterator = self.shapes.iterator();
while (iterator.next()) |n| {
n.value_ptr.shape.release();
}
self.idToEntity.deinit(self.allocator);
// core.undefineComponent(PhysicsCharacter);
// core.undefineComponent(PhysicsCollider);

View File

@ -101,6 +101,7 @@ pub fn setup(self: *@This()) !void {
pub fn destroy(self: *@This()) void {
self.screenContext.destroy();
self.runtime.destroy();
self.drawList.deinit();
self.allocator.destroy(self);
}

File diff suppressed because it is too large Load Diff

View File

@ -234,6 +234,8 @@ pub const ExternGameObject = struct {
}
pub fn destroy(self: *@This()) void {
self.consoleWindow.deinit();
self.physicsObjectsWindow.destroy();
self.allocator.destroy(Slack.fromPtr(self));
}
};