G++ Multi-platform memory leak detection tool

后端 未结 6 712
不思量自难忘°
不思量自难忘° 2021-02-05 20:58

Does anyone know where I can find a memory memory leak detection tool for C++ which can be either run in a command line or as an Eclipse plug-in in Windows and Linux. I would l

6条回答
  •  轮回少年
    2021-02-05 21:26

    In newer versions of gcc there is something called leak sanitizer. You just have to add -fsanitize=leak to compile command. Then you run your program normally and at the end, if there was any leak, you'll get summary (in terminal of course).

提交回复
热议问题