I don't use malloc
import std.stdio: writeln;
2 │
3 │ class C{
4 │ int[] i=null;
5 │ this(){
6 │ writeln("Allocate heap");
7 │ i=new int[10000];
8 │ writeln(typeid(typeof(i)));
9 │ writeln(typeid(typeof(i.ptr)));
10 │ i[9000]=5;
11 │ }
12 │ ~this(){
13 │ writeln("Free heap");
14 │ import object: destroy;
15 │ import core.memory: GC;
16 │ i=null; // But How to force GC free ? -------------?
17 │ };
18 │ }