How to use D without the GC ?

Dukc ajieskola at gmail.com
Fri Jun 14 14:30:53 UTC 2024


bachmeier kirjoitti 14.6.2024 klo 16.48:
> See the example I posted elsewhere in this thread: 
> https://forum.dlang.org/post/mwerxaolbkuxlgfepzwc@forum.dlang.org
> 
> I defined
> 
> ```
> @nogc ~this() {
>    free(ptr);
>    printf("Data has been freed\n");
> }
> ```
> 
> and that gets called when the reference count hits zero.

Oh sorry, missed that.


More information about the Digitalmars-d-learn mailing list