2012-04-28 58 views
1
==1581== 
==1581== HEAP SUMMARY: 
==1581==  in use at exit: 49,152 bytes in 3 blocks 
==1581== total heap usage: 4 allocs, 1 frees, 50,176 bytes allocated 
==1581== 
==1581== LEAK SUMMARY: 
==1581== definitely lost: 0 bytes in 0 blocks 
==1581== indirectly lost: 0 bytes in 0 blocks 
==1581==  possibly lost: 0 bytes in 0 blocks 
==1581== still reachable: 49,152 bytes in 3 blocks 
==1581==   suppressed: 0 bytes in 0 blocks 
==1581== Reachable blocks (those to which a pointer was found) are not shown. 
==1581== To see them, rerun with: --leak-check=full --show-reachable=yes 
==1581== 
==1581== For counts of detected and suppressed errors, rerun with: -v 
==1581== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4) 
Killed 
+2

那麼你怎麼能指望我們知道爲什麼發生這種情況?告訴我們一些代碼或其他東西。 – mfontanini 2012-04-28 03:09:55

回答

0

執行檢查時,理論上某些分配的塊仍然存在。也許靜態或全局數據將在稍後處理。或者超過應用程序代碼的C++標準流(從未銷燬)。

這裏有一個提示:

== 1581 ==可達塊(那些其中指針被發現)未示出。
== == 1581要看到他們後,再重新用:--leak檢查=全--show-可達= YES