Are D classes always garbage collected?
lugtug at gmail.com
Wed Dec 21 20:15:24 PST 2011
>> You can allocate classes anywhere, if you're OK with
>> forfeiting safety guarantees. For example, see emplace in
Hum calling emplace ending up calling this bit of code..
T* emplace(T)(T* chunk)
if (is(T == class))
*chunk = null;
Which returned me a nice fat null pointer.. wth? Perhaps that
should be a compile time error if you aren't supposed to use
I tried placement new syntax but this tells me I need an
allocator, whatever that means..
I swear D is google proof sigh
More information about the Digitalmars-d-learn