Comment #0 by bearophile_hugs — 2014-12-12T10:46:31Z
I suggest to add to Phobos a simple function like this one:
T* uninitializedAlloc(T)() pure nothrow @trusted {
return cast(T*)GC.malloc(T.sizeof);
}
Such function can also take a little care for the presence of internal pointers to better tell the GC about their absence or presence.
Comment #1 by bearophile_hugs — 2014-12-23T10:43:01Z
Comment #3 by bearophile_hugs — 2014-12-25T13:59:14Z
(In reply to Martin Nowak from comment #2)
> What does minimally initialized mean again?
Pointers and class references are initialized to null, recursively. The other parts are left uninitialized.
Comment #4 by robert.schadek — 2024-12-01T16:23:17Z