Getting completely (I mean ENTIRELY) rid off GC

po via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 13 05:05:58 PDT 2014


>> Smart pointers are rarely used, most C++ stuff is done by 
>> value.
>
> Strings too?

  Two string types are used.

-std::string type: by value, has smaller buffer optimization, 
used at startup/logging, and for any dynamic strings with 
unbounded possible values

-immutable string handles: by value. When created it looks up 
into a hash to find or create that string. Two immutable strings 
with the same value, will always use the same pointer(like Lua). 
These are never destroyed, they are intended as handles.


More information about the Digitalmars-d mailing list