Karl Dahlke <[email protected]> writes:

> I have always wondered about gc in c++.

C++ doesn't have true GC.  What it has is deterministic destruction of
objects.  You can use objects to manage resources (such as heap), that
will be reclaimed when the object goes out of scope or is destroyed via
the "delete" operator.
In C++, it's called RAII, short for "resource acquisition is
initialization".  Turns out that you can do some really fancy stuff like
ref-counted smart pointers that free the associated memory when the last
referencing object goes away.  This isn't true GC, but it gets you some
of the benefits.

-- Chris
_______________________________________________
Edbrowse-dev mailing list
[email protected]
http://lists.the-brannons.com/mailman/listinfo/edbrowse-dev

Reply via email to