How to delete dynamic array ?

bearophile bearophileHUGS at lycos.com
Mon Dec 30 00:13:29 PST 2013


Ilya Yaroshenko:

> case 1:
>  delete ar;

It's deprecated.


> case 4:
>  ar = null;// (assumed that ar is only one pointer to the same 
> array)

It's the simpler way.


> How to free memory to the system immediately?

What is your use case?

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list