stefanhendriks / Dune-II---The-Maker

A remake of the classic Dune 2 - The Building of a Dynasty (by Westwood Studios) with several enhancements. Like: higher screenresolutions, zooming, multiselect, skirmish play, etc.
https://www.dune2themaker.com
304 stars 27 forks source link

Add memory leak detection #101

Open stefanhendriks opened 3 years ago

stefanhendriks commented 3 years ago

Use http://wyw.dcweb.cn/leakage.htm ?

pbomta commented 2 years ago

I can recommend address sanitizer. It's the go-to tool for detection of memory probelms nowadays. We would need to get d2tm to compile with clang, so we may need to get rid of the binary dependencies first. Also, I would propose to introduce smart pointers and perhaps put some objects on the stack instead of new-ing them first, before scanning for leaks.

stefanhendriks commented 2 years ago

370