mas-bandwidth / yojimbo

A network library for client/server games written in C++
BSD 3-Clause "New" or "Revised" License
2.48k stars 244 forks source link

Leak detection: Use registered printf & assert #173

Closed jorgenpt closed 1 year ago

jorgenpt commented 2 years ago

Instead of directly calling printf and exit, use yojimbo_printf and yojimbo_assert in the leak detection in Allocator::~Allocator.

This helps integrate better with client applications.

Also switch the default_assert_handler to use yojimbo_printf.

sherief commented 1 year ago

Upvoting this - I've been bitten by that exit(1) before where it was like "wait what? what just happened?". Hope nothing is blocking it from being merged into main.