memory-refactor
Patrick Cleaveliln 2025-07-19 23:03:10 +00:00
parent 9ace98118d
commit df283ee49b
3 changed files with 0 additions and 17 deletions

View File

@ -158,13 +158,6 @@ expose_event_watcher :: proc "c" (state: rawptr, event: ^sdl2.Event) -> i32 {
} }
main :: proc() { main :: proc() {
track: mem.Tracking_Allocator
mem.tracking_allocator_init(&track, context.allocator)
context.allocator = mem.tracking_allocator(&track)
defer {
}
ts.set_allocator() ts.set_allocator()
_command_arena: mem.Arena _command_arena: mem.Arena
@ -506,12 +499,4 @@ main :: proc() {
} }
sdl2.Quit(); sdl2.Quit();
if len(track.allocation_map) > 0 {
fmt.eprintf("=== %v allocations not freed: ===\n", len(track.allocation_map))
for _, entry in track.allocation_map {
fmt.eprintf("- %v bytes @ %v\n", entry.size, entry.location)
}
}
mem.tracking_allocator_destroy(&track)
} }

View File

@ -10,7 +10,6 @@ import "vendor:sdl2"
import ts "../tree_sitter" import ts "../tree_sitter"
import "../core" import "../core"
import "../input"
import "../util" import "../util"
import "../ui" import "../ui"

View File

@ -10,7 +10,6 @@ import "vendor:sdl2"
import ts "../tree_sitter" import ts "../tree_sitter"
import "../core" import "../core"
import "../input"
import "../util" import "../util"
import "../ui" import "../ui"