この最小限のプログラム:
int main()
{
return 0;
}
valgrindでコンパイルしgcc
て実行すると、問題なく動作します。
を使用して D プログラムとしてコンパイルすると、
dmd test_new.d && valgrind ./test_new
私は得る:
HEAP SUMMARY:
in use at exit: 360 bytes in 4 blocks
total heap usage: 22 allocs, 18 frees, 52,024 bytes allocated
LEAK SUMMARY:
definitely lost: 288 bytes in 3 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
still reachable: 72 bytes in 1 blocks
suppressed: 0 bytes in 0 blocks
gdc を使用:
gdc -o test_new test_new.d && valgrind ./test_new
私は得る
HEAP SUMMARY:
in use at exit: 568 bytes in 4 blocks
total heap usage: 23 allocs, 19 frees, 52,664 bytes allocated
LEAK SUMMARY:
definitely lost: 496 bytes in 3 blocks
indirectly lost: 0 bytes in 0 blocks
possibly lost: 0 bytes in 0 blocks
still reachable: 72 bytes in 1 blocks
suppressed: 0 bytes in 0 blocks
ここで何が問題なのですか?