Valgrind 告诉我:
==19305== 16 bytes in 1 blocks are definitely lost in loss record 19 of 179
==19305== at 0x402842F: operator new(unsigned int)
==19305== by 0x805273E: Loader::createLevel(int, int, std::string, Player*, int, int, int)
==19305== by 0x80551B0: Loader::loadLevel()
==19305== by 0x80676C2: main (main.cpp:38)
我的函数Loader:.createLevel
有几个new
语句。我如何知道其中哪一个导致泄漏(即线路)?
谢谢!
PS:我很乐意发布代码,但它太长了:/