diff --git a/zig-ecs/src/resources/cache.zig b/zig-ecs/src/resources/cache.zig index 08614a7..e0aad08 100644 --- a/zig-ecs/src/resources/cache.zig +++ b/zig-ecs/src/resources/cache.zig @@ -15,7 +15,8 @@ pub fn Cache(comptime T: type, TLoader: type) type { }; } - pub fn deinit(self: @This()) void { + pub fn deinit(self: *@This()) void { + self.clear(); self.resources.deinit(); } diff --git a/zig-ecs/src/signals/delegate.zig b/zig-ecs/src/signals/delegate.zig index 30a74b0..aafc5eb 100644 --- a/zig-ecs/src/signals/delegate.zig +++ b/zig-ecs/src/signals/delegate.zig @@ -22,7 +22,7 @@ pub fn Delegate(comptime Event: type) type { .callback = .{ .bound = struct { fn cb(self: usize, param: Event) void { - return @call(.{ .modifier = .always_inline }, @field(@intToPtr(T, self), fn_name), .{param}); + @call(.{ .modifier = .always_inline }, @field(@intToPtr(T, self), fn_name), .{param}); } }.cb, },