} Squirrel Squirrel uses reference counting with cycle detection. This tiny language is relatively unknown outside the video game industry; however, it is a concrete example of how reference counting can be practical and efficient (especially in realtime environments). Tcl Tcl 8 uses reference counting for memory management of values (Tcl Obj structs). Since Tcl's values are immutable, reference cycles are impossible to form and no cycle detection scheme is needed. Operations that would replace a value with a modified copy are generally optimized to instead modify the original when its reference count indicates that it is not shared. The references are counted at a data structure level, so the problems with very frequent updates discussed above do not arise. Xojo Xojo also uses reference counting, without any special handling of circular references, although (as in Cocoa and C++ above), Xojo does support weak references, which allows programmers to avoid creating a cycle. File systems Many file systems maintain reference counts to any particular block or file, for example the inode link count on Unix-style file systems, which are usually known as hard links. When the count reaches zero, the file can be safely deallocated. While references can still be made from directories, some Unixes only allow references from live processes, and there can be files that exist outside the file system hierarchy. References External links The Memory Manager Reference: Beginner's Guide: Recycling: Reference Counts An On-the-Fly Reference-Counting Garbage Collector for Java, Yossi Levanoni and Erez Petrank Atomic Reference Counting Pointers: A lock-free, async-free, thread-safe, multiprocessor-safe reference counting pointer, Kirk Reinholtz Extending and Embedding the Python Interpreter: Extending Python with C or C++: Reference Counts, Guido van Rossum Down for the count? Getting reference counting back in the ring, Rifat Shahriyar, Stephen M. Blackburn and Daniel Frampton Automatic memory management Memory management