The D standard library is built on GC, is that a negative or positive?
Nick Treleaven
nick at geany.org
Fri Dec 16 14:31:25 UTC 2022
On Wednesday, 14 December 2022 at 08:01:47 UTC, cc wrote:
> How do you instantiate one using malloc?
Just came up with this, seems to work:
```d
class C
{
int i;
}
void main()
{
import std.experimental.allocator;
import std.experimental.allocator.mallocator;
TypedAllocator!Mallocator a;
C c = a.make!C;
c.i++;
a.dispose(c);
}
```
More information about the Digitalmars-d
mailing list