News for hackers. Stuff that matters.
Re:The Odin Programming Language by gingerBill on Friday January 31, 2020 @06:13PM (#22206949)
Odin can achieve the same feature of checking memory leaks with it's custom allocator system. You can very easily have a custom allocator track the allocations of everything, including its source location. This is because Odin was heavily designed around custom allocators as a core feature.

And coupled with the implicit `context` system, it can very easily profile third party Odin code's allocations too!

Re:The Odin Programming Language by beefdev on Friday January 31, 2020 @06:45PM (#22207182)
BeefLang will report leaks as they occur, not when the program shuts down. There's a tracing "GC" in debug mode for detecting unreachable memory in realtime. It's also used for reliably detecting use-after-free since memory is held when there are references and released when the last reference goes away -- again, a debug-only feature.
Re:The Odin Programming Language by gingerBill on Friday January 31, 2020 @06:57PM (#22207260)
This is totally possible with custom allocators in Odin too. You'll be surprised by how much custom allocators can do, but so many people know little about them.
Re:The Odin Programming Language by omaranto on Friday January 31, 2020 @10:19PM (#22208418)
Am I understanding correctly that in Odin feature could even be provided by a third party library implementing such a custom collector? If so, that's seriously cool.