I am taking a course on programming language design, and one of the topics is Garbage Collection. I understood from the material that RC can be used for GC, but that it also has other uses, and that some languages implement RC but not GC.
What exactly is the use of RC if not for GC?
(RC – reference counting. GC – garbage collection)
Reference counting may be used, eg, to close unreferenced file handles, or to somehow “archive” currently unreferenced data (that can potentially be rereferenced through some indirect path in the future).