This commit is contained in:
Mike 2020-06-04 23:26:34 -07:00
parent 5b62f55123
commit bb688e52f4
2 changed files with 3 additions and 2 deletions

View File

@ -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(); self.resources.deinit();
} }

View File

@ -22,7 +22,7 @@ pub fn Delegate(comptime Event: type) type {
.callback = .{ .callback = .{
.bound = struct { .bound = struct {
fn cb(self: usize, param: Event) void { 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, }.cb,
}, },