GCPtr is a C++ smart pointer library with garbage collection. It defines a class of smart pointers which can be used to create and manage dynamic objects and arrays which are destroyed and freed by garbage collection when they are no longer referenced. These smart pointers are not based on reference counting. Garbage collection uses a mark-and-sweep algorithm.