Is this ok ? ``` void main(){ int[] i=new int[10000]; import object: destroy; destroy(i); import core.memory: GC; GC.free(GC.addrOf(cast(void *)(i.ptr))); } ```
Re: How to free memory ater use of "new" to allocate it.
Alain De Vos via Digitalmars-d-learn Sun, 16 Jul 2023 11:46:36 -0700
- Re: How to free ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
- Re: How to ... Alain De Vos via Digitalmars-d-learn
- Re: How... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
- Re: How... Steven Schveighoffer via Digitalmars-d-learn