News for hackers. Stuff that matters.
Re:How to design a replacement for C++ by anamax on Thursday July 22, 2010 @01:49PM (#1538942)
> 3. No, mark-sweep garbage collection can be made to coexist with C++-style memory management.

GC depends on being able to find all valid pointers. C++ allows pointer games, like the xor trick for doubly-linked lists, which hide pointers. (It uses a single pointer field in each element to represent both the forward and backward pointer.)

GC can't collect things that are algorithmically inaccessible. There are algorithms that are efficient because they don't kill pointers to objects that are no longer in use.

I like GC, but there are costs.

There are no comments on this comment yet.