On 7/17/2014 11:44 AM, Russel Winder via Digitalmars-d wrote:
With C++ I am coming to grips with RAII management of the heap. With
Java, Groovy, Go and Python I rely on the GC doing a good job. I note
though that there is a lot of evidence that the Unreal folk developed a
garbage collector for C++ exactly because they didn't want to do the
RAII thing.

RAII has a lot of costs associated with it that I am often surprised go completely unrecognized by the RAII comunity:

1. the "dec" operation (i.e. shared_ptr) is expensive

2. the inability to freely mix pointers allocated with different schemes

3. slices become mostly unworkable, and slices are a fantastic way to speed up a program

Reply via email to