How to use destroy and free.

Alain De Vod devosalain at ymail.com
Sun Apr 24 21:00:50 UTC 2022


Is this a correct program to explicit call destroy & free ?

```
void main(){
     int[] i=new int[10000];
     import object: destroy;
     destroy(i);
     import core.memory: GC;
     GC.free(GC.addrOf(cast(void *)(i.ptr)));
}
```




More information about the Digitalmars-d-learn mailing list