mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-31 01:28:55 +00:00
properly deinit cache
This commit is contained in:
@@ -289,6 +289,8 @@ pub fn deinit(self: *Runtime) void {
|
||||
wba.deinit(self.allocator);
|
||||
}
|
||||
|
||||
if (self.cache) |*cache| cache.deinit();
|
||||
|
||||
globalDeinit();
|
||||
}
|
||||
|
||||
|
||||
6
src/network/cache/Cache.zig
vendored
6
src/network/cache/Cache.zig
vendored
@@ -28,6 +28,12 @@ kind: union(enum) {
|
||||
fs: FsCache,
|
||||
},
|
||||
|
||||
pub fn deinit(self: *Cache) void {
|
||||
return switch (self.kind) {
|
||||
inline else => |*c| c.deinit(),
|
||||
};
|
||||
}
|
||||
|
||||
pub fn get(self: *Cache, arena: std.mem.Allocator, req: CacheRequest) ?CachedResponse {
|
||||
return switch (self.kind) {
|
||||
inline else => |*c| c.get(arena, req),
|
||||
|
||||
Reference in New Issue
Block a user