#GPA not warning about leaked memory

1 messages · Page 1 of 1 (latest)

sonic reef
#

Why would a GPA not warn about leaked memory?
I don't have a minimal reproducible example. I just noticed that after writing my program, I'm leaking a ton of memory and the GPA isn't telling me about it.

zealous plank
#

how do you know exactly youre leaking? are you deiniting the gpa?

#

it only tells you there are leaks on deinit/detectLeaks

untold jackal
#

something i did a couple days ago that was a bit silly was override the std.log functions with my own, and add some handling for selecting which scopes to debug print
that made the gpa log messages not print since i never enabled the gpa scope.
just a random story, mayhaps could be happening to you.

sonic reef
zealous plank
#

zig doesnt have any kind of RAII so nothing like that is possible

#

you probably just did defer gpa.deinit() 99% of the time and forgot about it