alecthomas / entityx

EntityX - A fast, type-safe C++ Entity-Component system
MIT License
2.21k stars 295 forks source link

Fix minor memory leak from simplesignal.h and inside pool_test.cc #211

Closed chocolatemelt closed 6 years ago

chocolatemelt commented 6 years ago

The test leak doesn't particularly matter, but simplesignal.h has a minor direct leak when using the size() function for receivers. I recently submitted the fix to that repository as well, it was a quick one-liner but it seems the entityx/simplesignal.h is a couple commits behind.

Should be able to see the leaks when you add -fsanitize=address to the debug flags and run event_test and pool_test.

alecthomas commented 6 years ago

This broke the test on Windows due to an unguarded import of unistd.h by simplesignal.h. I'm going to revert it.