On Saturday, 15 May 2021 at 18:15:24 UTC, Dennis wrote:
On Saturday, 15 May 2021 at 17:55:17 UTC, Alain De Vos wrote:
Feature request, a function old which does the opposite of new, allowing deterministic,real-time behavior and memory conservation.

You can use [object.destroy](https://dlang.org/phobos/object.html#.destroy) to destruct, and [GC.free](https://dlang.org/phobos/core_memory.html#.GC.free) to free memory allocated with `new`.

Specifically you wanna do:

```
.destroy(*ptr);
GC.free(GC.addrOf(ptr));
```

Reply via email to