diff options
| author | iamcheeseman <[hidden email]> | 2026-01-15 12:41:07 -0500 |
|---|---|---|
| committer | iamcheeseman <[hidden email]> | 2026-01-15 12:41:07 -0500 |
| commit | 3c640e0d8244f87fec9518a60c7e5e95713d7f78 (patch) | |
| tree | 833ee225a307ad66b784a6cdc55505d2609f9629 /tools/compile_assets | |
| parent | 18dda98bfc5534a9de98811944f967f7c767832a (diff) | |
Fix memory leaks in the asset compiler
Diffstat (limited to 'tools/compile_assets')
| -rw-r--r-- | tools/compile_assets/main.odin | 2 | ||||
| -rw-r--r-- | tools/compile_assets/tiled.odin | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/compile_assets/main.odin b/tools/compile_assets/main.odin index b9c33db..01fdb3f 100644 --- a/tools/compile_assets/main.odin +++ b/tools/compile_assets/main.odin @@ -20,8 +20,6 @@ package demonchime // This file is autogenerated by tools/compile_assets // All resource types are defined in 'src/resources.odin'. -import rl "vendor:raylib" - Image_Id :: enum { <image-enum>} diff --git a/tools/compile_assets/tiled.odin b/tools/compile_assets/tiled.odin index 9305acc..29a6a69 100644 --- a/tools/compile_assets/tiled.odin +++ b/tools/compile_assets/tiled.odin @@ -366,7 +366,7 @@ load_json_tileset :: proc(path: string) { } } - gids := make([]u32, len(local_tiles)) + gids := make([]u32, len(local_tiles), context.temp_allocator) for tile, i in local_tiles { gids[i] = first_gid + u32(i) } @@ -407,7 +407,7 @@ load_json_room :: proc(path: string, file: ^os.File) { gid, exists := gids[tileset_name] if !exists { load_json_tileset(strings.concatenate({ - filepath.dir(path), + filepath.dir(path, context.temp_allocator), "/", tileset.source, })) |
