2 qq 34426116 qq_34426116 于 2016.03.30 17:46 提问

rapidjson貌似有内存泄漏

rapidjson::Document doc;
就以上代码,用valgrind
==20461== in use at exit: 72,704 bytes in 1 blocks
==20461== total heap usage: 3 allocs, 2 frees, 72,806 bytes allocated
==20461==
==20461== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1
==20461== at 0x4C28D06: malloc (vg_replace_malloc.c:299)
==20461== by 0x4EBF17F: ??? (in /usr/lib64/libstdc++.so.6.0.21)
==20461== by 0x400F799: call_init.part.0 (in /usr/lib64/ld-2.22.so)
==20461== by 0x400F8AA: _dl_init (in /usr/lib64/ld-2.22.so)
==20461== by 0x4000CB9: ??? (in /usr/lib64/ld-2.22.so)
==20461==
==20461== LEAK SUMMARY:
==20461== definitely lost: 0 bytes in 0 blocks
==20461== indirectly lost: 0 bytes in 0 blocks
==20461== possibly lost: 0 bytes in 0 blocks
==20461== still reachable: 72,704 bytes in 1 blocks
==20461== suppressed: 0 bytes in 0 blocks

大家有遇到吗?

1个回答

laocui172
laocui172   2017.08.23 17:46

楼主的问题确认了吗?

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!