How to use destroy and free.

Tejas notrealemail at gmail.com
Sat Apr 30 11:37:32 UTC 2022


On Saturday, 30 April 2022 at 09:25:18 UTC, Dukc wrote:
> On Sunday, 24 April 2022 at 21:00:50 UTC, Alain De Vod wrote:
>> [...]
>
> A few picks.
>
> 1: You do not need to import `destroy`. Everything in `object` 
> is automatically imported.
>
> [...]

Hell, just using `scope int[] i` should be enough to trigger 
deterministic destruction, no? `typecons`'s `Scoped!` template 
can be used if 100% guarantee is needed _and_ the memory has to 
be stack allocated


More information about the Digitalmars-d-learn mailing list