Skip to content
Main menu
  • Main page
  • Discover
  • Unexpected connections
  • Topics
  • Random article
  • Search
Your library
  • Saved articles
  • Recent discoveries
  • Rabbit-hole trails
Topic areas
  • Computer Science
  • Mathematics
  • Physics
  • Engineering
  • Biology
  • Economics
  • Curiosities
WikiholeDeeper into Wikipedia
EnglishEN
  • Saved
  • History

  • Article text and media come live from Wikipedia via the official MediaWiki API and are available under the Creative Commons Attribution-ShareAlike 4.0 License; additional terms may apply. Each article links to its source and revision.
  • WikiHole is an independent project and is not affiliated with the Wikimedia Foundation.
  • How ranking works
  • All topics
  • Reading history
  • Random article
  • MediaWiki API

Garbage collection (computer science)

  • Article
  • Rabbit hole
  • Read
  • View history
Tools
Actions
  • Read
  • View history
General
  • Recent changes
  • Related articles
  • Random discovery
This article
Reading time
15 min
Topic
Computer Science
Quality
C-class
Views
3k in 14 days
Last edited
9 Nov 2026
Print/export
  • Printable version
In other projects
  • Wikidata item
From Wikipedia, the free encyclopedia
Rabbit hole:
  1. Garbage collection (computer science)
Garbage collection (computer science)
Form of automatic memory management

In computer science, garbage collection (GC) is a form of automatic memory management.2 The garbage collector attempts to reclaim memory that was allocated by the program, but is no longer referenced; such memory is called garbage. Garbage collection was invented by American computer scientist John McCarthy around 1959 to simplify manual memory management in Lisp.3

This article is about garbage collection in memory management. For garbage collection in a solid-state drive, see Garbage collection (SSD).

After that, the working memory contents is discarded in favor of the compacted copy, and the role of working and free memory are exchanged (depicted).

Garbage collection relieves the programmer from doing manual memory management, where the programmer specifies what objects to de-allocate and return to the memory system and when to do so.2 Other, similar techniques include stack allocation, region inference, and memory ownership, and combinations thereof. Garbage collection may take a significant proportion of a program's total processing time, and affect performance as a result.

Resources other than memory, such as network sockets, database handles, windows, file descriptors, and device descriptors, are not typically handled by garbage collection, but rather by other methods (e.g. destructors). Some such methods de-allocate memory also.

Loading the rest of the article…

Recent changes

Rabbit hole

Where Garbage collection (computer science) leads. Every connection below has a source: a link in this article, a shared Wikipedia category, or CirrusSearch text similarity. Articles already on your trail are left out.

Contents
  • (Top)
  • Overview
  • Strategies
  • Availability
  • See also
  • References
  • Further reading
  • External links
  • Recent changes
  • Rabbit hole
Contents
Contents9 sections
  • (Top)
  • Overview
  • Advantages
  • Disadvantages
  • Strategies
  • Tracing
  • Reference counting
  • Escape analysis
  • Availability
  • BASIC
  • C and C++
  • Objective-C
  • Limited environments
  • Java
  • Compile-time use
  • Real-time systems
  • See also
  • References
  • Further reading
  • External links
  • Recent changes
  • Rabbit hole
Study aids for Garbage collection (computer science)

Terminology

garbage collection
In computer science, garbage collection (GC) is a form of automatic memory management.
GC
In computer science, garbage collection (GC) is a form of automatic memory management.
garbage
In computer science, garbage collection (GC) is a form of automatic memory management.
Cycles
Cycles: If two or more objects refer to each other, they can create a cycle whereby neither will be collected as their mutual references never let their reference counts become zero.
Space overhead (reference count)
Space overhead (reference count): Reference counting requires space to be allocated for each object to store its reference count.
Speed overhead (increment/decrement)
Speed overhead (increment/decrement): In naive implementations, each assignment of a reference and each reference falling out of scope often require modifications of one or more reference counters.
Requires atomicity
Requires atomicity: When used in a multithreaded environment, these modifications (increment and decrement) may need to be atomic operations such as compare-and-swap, at least for any objects which are shared, or potentially shared among multiple threads.
Not real-time
Not real-time: Naive implementations of reference counting do not generally provide real-time behavior, because any pointer assignment can potentially cause a number of objects bounded only by total allocated memory size to be recursively freed while the thread is unable to perform other work.

Terms the article defines in bold, quoted in context.

Categories:
  • Memory management
  • Automatic memory management
  • Solid-state computer storage

2,858 words · 46 references · revision 1384600317 · CC BY-SA 4.0

General
  • Recent changes
  • Related articles
  • Random discovery
This article
Reading time
15 min
Topic
Computer Science
Quality
C-class
Views
3k in 14 days
Last edited
9 Nov 2026

Key concepts

  • Lisp (programming language)3
  • Manual memory management2
  • Destructor (computer programming)2
  • Memory management1
  • Garbage (computer science)1
  • John McCarthy (computer scientist)1
  • Stack-based memory allocation1
  • Region inference1
  • Computer performance1
  • Network socket1

The articles this one links to most, weighted towards the introduction.

Print/export
  • Printable version
In other projects
  • Wikidata item

Overview

Many programming languages require garbage collection, either as part of the language specification (e.g., RPL, Java, C#, D,4 Go, and most scripting languages) or effectively for practical implementation (e.g., formal languages like lambda calculus).5 These are said to be garbage-collected languages. Other languages, such as C and C++, were designed for use with manual memory management, but have garbage-collected implementations available. Some languages, like Ada, Modula-3, and C++/CLI, allow both garbage collection and manual memory management to co-exist in the same application by using separate heaps for collected and manually managed objects. Still others, like D, are garbage-collected but allow the user to manually delete objects or even disable garbage collection entirely when speed is required.6

Although many languages integrate GC into their compiler and runtime system, post-hoc GC systems also exist, such as Automatic Reference Counting (ARC). Some of these post-hoc GC systems do not require recompilation.7

Advantages

GC frees the programmer from manually de-allocating memory. This helps avoid some kinds of errors:8

  • Dangling pointers, which occur when a piece of memory is freed while there are still pointers to it, and one of those pointers is dereferenced. By then the memory may have been reassigned to another use, with unpredictable results.5
  • Double free bugs, which occur when the program tries to free a region of memory that has already been freed, and perhaps already been allocated again.
  • Certain kinds of memory leaks, in which a program fails to free memory occupied by objects that have become unreachable, which can lead to memory exhaustion.9

Disadvantages

GC uses computing resources to decide which memory to free. Therefore, the penalty for the convenience of not annotating object lifetime manually in the source code is overhead, which can impair program performance.10 A peer-reviewed paper from 2005 concluded that GC needs five times the memory to compensate for this overhead and to perform as fast as the same program using idealized explicit memory management. The comparison however is made to a program generated by inserting deallocation calls using an oracle, implemented by collecting traces from programs run under a profiler, and the program is only correct for one particular execution of the program.11 Interaction with memory hierarchy effects can make this overhead intolerable in circumstances that are hard to predict or to detect in routine testing. The impact on performance was given by Apple as a reason for not adopting garbage collection in iOS, despite it being the most desired feature.12

The moment when the garbage is actually collected can be unpredictable, resulting in stalls (pauses to shift/free memory) scattered throughout a session. Unpredictable stalls can be unacceptable in real-time environments, in transaction processing, or in interactive programs. Incremental, concurrent, and real-time garbage collectors address these problems, with varying trade-offs.

Strategies

Tracing

Main article: Tracing garbage collection

Tracing garbage collection is the most common type of garbage collection, so much so that "garbage collection" often refers to tracing garbage collection, rather than other methods such as reference counting. The overall strategy consists of determining which objects should be garbage collected by tracing which objects are reachable by a chain of references from certain root objects, and considering the rest as garbage and collecting them.13 However, there are a large number of algorithms used in implementation, with widely varying complexity and performance characteristics.

Reference counting

Main article: Reference counting

Reference counting garbage collection is where each object has a count of the number of references to it. Garbage is identified by having a reference count of zero. An object's reference count is incremented when a reference to it is created and decremented when a reference is destroyed. When the count reaches zero, the object's memory is reclaimed.14

As with manual memory management, and unlike tracing garbage collection, reference counting guarantees that objects are destroyed as soon as their last reference is destroyed, and usually only accesses memory which is either in CPU caches, in objects to be freed, or directly pointed to by those, and thus tends to not have significant negative side effects on CPU cache and virtual memory operation.

There are a number of disadvantages to reference counting; this can generally be solved or mitigated by more sophisticated algorithms:

Cycles
If two or more objects refer to each other, they can create a cycle whereby neither will be collected as their mutual references never let their reference counts become zero. Some garbage collection systems using reference counting (like the one in ) use specific cycle-detecting algorithms to deal with this issue. Another strategy is to use for the "backpointers" which create cycles. Under reference counting, a weak reference is similar to a weak reference under a tracing garbage collector. It is a special reference object whose existence does not increment the reference count of the referent object. Furthermore, a weak reference is safe in that when the referent object becomes garbage, any weak reference to it , rather than being permitted to remain dangling, meaning that it turns into a predictable value, such as a null reference.

Availability

Generally speaking, higher-level programming languages are more likely to have garbage collection as a standard feature. In some languages lacking built-in garbage collection, it can be added through a library, as with the Boehm garbage collector for C and C++.

Most functional programming languages, such as ML, Haskell, and APL, have garbage collection built in. Lisp is especially notable as both the first functional programming language and the first language to introduce garbage collection.22

Other dynamic languages, such as Ruby and Julia (but not Perl 5 or PHP before version 5.3,23 which both use reference counting), JavaScript and ECMAScript also tend to use GC. Object-oriented programming languages such as , , and usually provide integrated garbage collection. Notable exceptions are and , which have .

See also

  • Destructor (computer programming)
  • Dynamic dead-code elimination
  • Smart pointer
  • Virtual memory compression
  • Garbage collection (SSD)
  • Hardware-assisted garbage collection

References

  1. 1Abelson, Harold; Sussman, Gerald Jay; Sussman, Julie (2016). Structure and Interpretation of Computer Programs (PDF) (2nd ed.). Cambridge, Massachusetts, US: MIT Press. pp. 734–736.
  2. 2"What is garbage collection (GC) in programming?". Storage. Retrieved 21 June 2024.
  3. 3McCarthy, John (1960). "Recursive functions of symbolic expressions and their computation by machine, Part I". Communications of the ACM. 3 (4): 184–195. doi:10.1145/367177.367199. S2CID 1489409. Retrieved 29 May 2009.
  4. 4"Overview – D Programming Language". dlang.org. Digital Mars. Retrieved 29 July 2014.
  5. 5Heller, Martin (3 February 2023). "What is garbage collection? Automated memory management for your programs". . Retrieved 21 June 2024.

Further reading

  • Jones, Richard; Hosking, Antony; Moss, J. Eliot B. (16 August 2011). The Garbage Collection Handbook: The Art of Automatic Memory Management. CRC Applied Algorithms and Data Structures Series. Chapman and Hall / CRC Press / Taylor & Francis Ltd. ISBN 978-1-4200-8279-1. (511 pages)
  • Jones, Richard; Lins, Rafael (12 July 1996). Garbage Collection: Algorithms for Automatic Dynamic Memory Management (1 ed.). Wiley. ISBN 978-0-47194148-4. (404 pages)
  • Schorr, Herbert; Waite, William M. (August 1967). "An Efficient Machine-Independent Procedure for Garbage Collection in Various List Structures" (PDF). Communications of the ACM. 10 (8): 501–506. doi:10.1145/363534.363554. S2CID 5684388. Archived (PDF) from the original on 22 January 2021.
  • Wilson, Paul R. (1992). "Uniprocessor Garbage Collection Techniques". Memory Management. Lecture Notes in Computer Science. Vol. 637. Springer-Verlag. pp. 1–42. :. . : ignored (help)

External links

  • The Memory Management Reference Archived 2020-12-13 at the Wayback Machine
  • The Very Basics of Garbage Collection
  • Java SE 6 HotSpot Virtual Machine Garbage Collection Tuning
  • TinyGC - an independent implementation of the BoehmGC API
  • Conservative Garbage Collection Implementation for C Language
  • MeixnerGC - an incremental mark and sweep garbage collector for C++ using smart pointers
CPython
15
weak references
lapses
Space overhead (reference count)
Reference counting requires space to be allocated for each object to store its reference count. The count may be stored adjacent to the object's memory or in a side table somewhere else, but in either case, every single reference-counted object requires additional storage for its reference count. Memory space with the size of an unsigned pointer is commonly used for this task, meaning that 32 or 64 bits of reference count storage must be allocated for each object. On some systems, it may be possible to mitigate this overhead by using a tagged pointer to store the reference count in unused areas of the object's memory. Often, an architecture does not actually allow programs to access the full range of memory addresses that could be stored in its native pointer size; a certain number of high bits in the address is either ignored or required to be zero. If an object reliably has a pointer at a certain location, the reference count can be stored in the unused bits of the pointer. For example, each object in Objective-C has a pointer to its class at the beginning of its memory; on the ARM64 architecture using iOS 7, 19 unused bits of this class pointer are used to store the object's reference count.1617
Speed overhead (increment/decrement)
In naive implementations, each assignment of a reference and each reference falling out of scope often require modifications of one or more reference counters. However, in a common case when a reference is copied from an outer scope variable into an inner scope variable, such that the lifetime of the inner variable is bounded by the lifetime of the outer one, the reference incrementing can be eliminated. The outer variable "owns" the reference. In the programming language C++, this technique is readily implemented and demonstrated with the use of const references. Reference counting in C++ is usually implemented using "smart pointers"18 whose constructors, destructors, and assignment operators manage the references. A smart pointer can be passed by reference to a function, which avoids the need to copy-construct a new smart pointer (which would increase the reference count on entry into the function and decrease it on exit). Instead, the function receives a reference to the smart pointer which is produced inexpensively. The Deutsch-Bobrow method of reference counting capitalizes on the fact that most reference count updates are in fact generated by references stored in local variables. It ignores these references, only counting references in the heap, but before an object with reference count zero can be deleted, the system must verify with a scan of the stack and register that no other reference to it still exists. A further substantial decrease in the overhead on counter updates can be obtained by update coalescing introduced by Levanoni and Petrank.1920 Consider a pointer that in a given interval of the execution is updated several times. It first points to an object O1, then to an object O2, and so forth until at the end of the interval it points to some object On. A reference counting algorithm would typically execute rc(O1)--, rc(O2)++, rc(O2)--, rc(O3)++, rc(O3)--, ..., rc(On)++. But most of these updates are redundant. In order to have the reference count properly evaluated at the end of the interval it is enough to perform rc(O1)-- and rc(On)++. Levanoni and Petrank measured an elimination of more than 99% of the counter updates in typical Java benchmarks.
Requires atomicity
When used in a multithreaded environment, these modifications (increment and decrement) may need to be atomic operations such as compare-and-swap, at least for any objects which are shared, or potentially shared among multiple threads. Atomic operations are expensive on a multiprocessor, and even more expensive if they have to be emulated with software algorithms. It is possible to avoid this issue by adding per-thread or per-CPU reference counts and only accessing the global reference count when the local reference counts become or are no longer zero (or, alternatively, using a binary tree of reference counts, or even giving up deterministic destruction in exchange for not having a global reference count at all), but this adds significant memory overhead and thus tends to be only useful in special cases (it is used, for example, in the reference counting of Linux kernel modules). Update coalescing by Levanoni and Petrank1920 can be used to eliminate all atomic operations from the write-barrier. Counters are never updated by the program threads in the course of program execution. They are only modified by the collector which executes as a single additional thread with no synchronization. This method can be used as a stop-the-world mechanism for parallel programs, and also with a concurrent reference counting collector.
Not real-time
Naive implementations of reference counting do not generally provide real-time behavior, because any pointer assignment can potentially cause a number of objects bounded only by total allocated memory size to be recursively freed while the thread is unable to perform other work. It is possible to avoid this issue by delegating the freeing of unreferenced objects to other threads, at the cost of extra overhead.

Escape analysis

Main article: Escape analysis

Escape analysis is a compile-time technique that can convert heap allocations to stack allocations, thereby reducing the amount of garbage collection to be done. This analysis determines whether an object allocated inside a function is accessible outside of it. If a function-local allocation is found to be accessible to another function or thread, the allocation is said to "escape" and cannot be done on the stack. Otherwise, the object may be allocated directly on the stack and released when the function returns, bypassing the heap and associated memory management costs.21

Smalltalk
ooRexx
RPL
Java
C++
Delphi
destructors

BASIC

BASIC and Logo have often used garbage collection for variable-length data types, such as strings and lists, so as not to burden programmers with memory management details. On the Altair 8800, programs with many string variables and little string space could cause long pauses due to garbage collection.24 Similarly the Applesoft BASIC interpreter's garbage collection algorithm repeatedly scans the string descriptors for the string having the highest address in order to compact it toward high memory, resulting in performance25 and pauses anywhere from a few seconds to a few minutes.26 A replacement garbage collector for Applesoft BASIC by Randy Wigginton identifies a group of strings in every pass over the heap, reducing collection time dramatically.27 BASIC.SYSTEM, released with ProDOS in 1983, provides a windowing garbage collector for BASIC that is many times faster.28

C and C++

C has never offered official support for garbage collection. C++ added garbage collection support in C++11 to the standard library, however this was removed in C++23 due to no compilers implementing support for the feature.29 The features that were part of this were related to pointer safety.30

Although garbage collection support in the standard library was removed, some garbage collectors such as Boehm garbage collector (for C and C++) can still be used. Boehm GC uses tracing garbage collection. It can also be used in leak detection mode, where memory management is still manual however leaks and double-free errors can be detected and reported. Its use can be called from the header <gc.h>.

One can still abstract away manual object destructions in C++ by using the "resource acquisition is initialization" (RAII) idiom and smart pointers. std::unique_ptr ties lifetimes to ownership, while std::shared_ptr uses reference counting to determine lifetime. std::weak_ptr can be used to obtain a pointer without increasing the reference count. Unlike garbage collection, RAII is deterministic.

Objective-C

While the Objective-C traditionally had no garbage collection, with the release of OS X 10.5 in 2007 Apple introduced garbage collection for Objective-C 2.0, using an in-house developed runtime collector.31 However, with the 2012 release of OS X 10.8, garbage collection was deprecated in favor of LLVM's automatic reference counter (ARC) that was introduced with OS X 10.7.32 Furthermore, since May 2015 Apple even forbade the usage of garbage collection for new OS X applications in the App Store.3334 For iOS, garbage collection has never been introduced due to problems in application responsivity and performance;1235 instead, iOS uses ARC.3637

Limited environments

Garbage collection is rarely used on embedded or real-time systems because of the usual need for very tight control over the use of limited resources. However, garbage collectors compatible with many limited environments have been developed.38 The Microsoft .NET Micro Framework, .NET nanoFramework39 and Java Platform, Micro Edition are embedded software platforms that, like their larger cousins, include garbage collection.

Java

Main article: Java virtual machine § Garbage collectors

Garbage collectors available in Java OpenJDKs virtual machine (JVM) include:

  • Serial
  • Parallel
  • CMS (Concurrent Mark Sweep)
  • G1 (Garbage-First)
  • ZGC (Z Garbage Collector)
  • Epsilon
  • Shenandoah
  • GenZGC (Generational ZGC)
  • GenShen (Generational Shenandoah)
  • IBM Metronome (only in IBM OpenJDK)
  • SAP (only in SAP OpenJDK)
  • Azul C4 (Continuously Concurrent Compacting Collector)40 (only in Azul Systems OpenJDK)

Compile-time use

Compile-time garbage collection is a form of static analysis allowing memory to be reused and reclaimed based on invariants known during compilation.

This form of garbage collection has been studied in the Mercury programming language,41 and it saw greater usage with the introduction of LLVM's automatic reference counter (ARC) into Apple's ecosystem (iOS and OS X) in 2011.363733

Real-time systems

Incremental, concurrent, and real-time garbage collectors have been developed, for example by Henry Baker and by Henry Lieberman.424344

In Baker's algorithm, the allocation is done in either half of a single region of memory. When it becomes half full, a garbage collection is performed which moves the live objects into the other half and the remaining objects are implicitly deallocated. The running program (the 'mutator') has to check that any object it references is in the correct half, and if not move it across, while a background task is finding all of the objects.45

Generational garbage collection schemes are based on the empirical observation that most objects die young. In generational garbage collection, two or more allocation regions (generations) are kept, which are kept separate based on the object's age. New objects are created in the "young" generation that is regularly collected, and when a generation is full, the objects that are still referenced from older regions are copied into the next oldest generation. Occasionally a full scan is performed.

Some high-level language computer architectures include hardware support for real-time garbage collection.

Most implementations of real-time garbage collectors use tracing. Such real-time garbage collectors meet hard real-time constraints when used with a real-time operating system.46

InfoWorld
  • 6"A Guide to Garbage Collection in Programming". freeCodeCamp.org. 16 January 2020. Retrieved 21 June 2024.
  • 7"Garbage Collection - D Programming Language". dlang.org. Retrieved 17 October 2022.
  • 8"Garbage Collection". rebelsky.cs.grinnell.edu. Retrieved 13 January 2024.
  • 9Microsoft (28 February 2023). "Fundamentals of garbage collection | Microsoft Learn". Retrieved 29 March 2023.
  • 10Zorn, Benjamin (22 January 1993). "The Measured Cost of Conservative Garbage Collection". Software: Practice and Experience. 23 (7). Department of Computer Science, University of Colorado Boulder: 733–756. doi:10.1002/spe.4380230704. S2CID 16182444.
  • 11Hertz, Matthew; Berger, Emery D. (2005). "Quantifying the Performance of Garbage Collection vs. Explicit Memory Management" (PDF). Proceedings of the 20th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications - OOPSLA '05. pp. 313–326. doi:10.1145/1094811.1094836. ISBN 1-59593031-0. S2CID 6570650. Archived (PDF) from the original on 2 April 2012. Retrieved 15 March 2015.
  • 12"Developer Tools Kickoff – session 300" (PDF). WWDC 2011. Apple, Inc. 24 June 2011. Archived from the original (PDF) on 4 September 2023. Retrieved 27 March 2015.
  • 13"A Unified Theory of Garbage Collection". cs.cornell.edu. 8 November 2019. Retrieved 22 April 2026.
  • 14Microsoft (27 January 2009). "Reference Counting Garbage Collection". Retrieved 29 March 2023.
  • 15"Reference Counts". Extending and Embedding the Python Interpreter. 21 February 2008. Retrieved 22 May 2014.
  • 16Ash, Mike. "Friday Q&A 2013-09-27: ARM64 and You". mikeash.com. Retrieved 27 April 2014.
  • 17"Hamster Emporium: [objc explain]: Non-pointer isa". Sealiesoftware.com. 24 September 2013. Retrieved 27 April 2014.
  • 18Pibinger, Roland (3 May 2005) [2005-04-17]. "RAII, Dynamic Objects, and Factories in C++".
  • 19Levanoni, Yossi; Petrank, Erez (2001). "An on-the-fly reference-counting garbage collector for java". Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. OOPSLA 2001. pp. 367–380. doi:10.1145/504282.504309.
  • 20Levanoni, Yossi; Petrank, Erez (2006). "An on-the-fly reference-counting garbage collector for java". ACM Trans. Program. Lang. Syst. 28: 31–69. doi:10.1145/1111596.1111597. S2CID 14777709.
  • 21Salagnac, Guillaume; Yovine, Sergio; Garbervetsky, Diego (24 May 2005). "Fast Escape Analysis for Region-based Memory Management". Electronic Notes in Theoretical Computer Science. 131: 99–110. doi:10.1016/j.entcs.2005.01.026.
  • 22Chisnall, David (12 January 2011). Influential Programming Languages, Part 4: Lisp.
  • 23"PHP: Performance Considerations". php.net. Retrieved 14 January 2015.
  • 24"Altair 8800 Basic 4.1 Reference Manual" (PDF). The Vintage Technology Digital Archive. April 1977. p. 108. Archived (PDF) from the original on 29 June 2021. Retrieved 29 June 2021.
  • 25"I did some work to speed up string garbage collection under Applesoft..." Hacker News. Retrieved 29 June 2021.
  • 26Little, Gary B. (1985). Inside the Apple IIc. Bowie, Md.: Brady Communications Co. p. 82. ISBN 0-89303-564-5. Retrieved 29 June 2021.
  • 27"Fast Garbage Collection". Call-A.P.P.L.E.: 40–45. January 1981.
  • 28Worth, Don (1984). Beneath Apple Pro DOS (PDF) (March 1985 printing ed.). Chatsworth, California, US: Quality Software. pp. 2–6. ISBN 0-912985-05-4. Archived (PDF) from the original on 3 December 2008. Retrieved 29 June 2021.
  • 29JF Bastien; Alisdair Meredith (16 April 2021). "Removing Garbage Collection Support".
  • 30"std::pointer_safety - cppreference.com". en.cppreference.com. Retrieved 9 December 2024.
  • 31"Objective-C 2.0 Overview". Archived from the original on 24 July 2010.
  • 32Siracusa, John (20 July 2011). "Mac OS X 10.7 Lion: the Ars Technica review".
  • 33"Apple says Mac app makers must transition to ARC memory management by May". AppleInsider. 20 February 2015.
  • 34Cichon, Waldemar (21 February 2015). "App Store: Apple entfernt Programme mit Garbage Collection". Heise.de. Retrieved 30 March 2015.
  • 35Silva, Precious (18 November 2014). "iOS 8 vs Android 5.0 Lollipop: Apple Kills Google with Memory Efficiency". International Business Times. Archived from the original on 3 April 2015. Retrieved 7 April 2015.
  • 36Napier, Rob; Kumar, Mugunth (20 November 2012). iOS 6 Programming Pushing the Limit. John Wiley & Sons. ISBN 978-1-11844997-4. Retrieved 30 March 2015.
  • 37Cruz, José R. C. (22 May 2012). "Automatic Reference Counting on iOS". Dr. Dobbs. Archived from the original on 16 May 2020. Retrieved 30 March 2015.
  • 38Fu, Wei; Hauser, Carl (2005). "A real-time garbage collection framework for embedded systems". Proceedings of the 2005 Workshop on Software and Compilers for Embedded Systems - SCOPES '05. pp. 20–26. doi:10.1145/1140389.1140392. ISBN 1-59593207-0. S2CID 8635481.
  • 39".NET nanoFramework".
  • 40Tene, Gil; Iyengar, Balaji; Wolf, Michael (2011). "C4: the continuously concurrent compacting collector" (PDF). ISMM '11: Proceedings of the international symposium on Memory management. doi:10.1145/1993478. ISBN 978-1-45030263-0. Archived (PDF) from the original on 9 August 2017.
  • 41Mazur, Nancy (May 2004). Compile-time garbage collection for the declarative language Mercury (PDF) (Thesis). Katholieke Universiteit Leuven. Archived (PDF) from the original on 27 April 2014.
  • 42Huelsbergen, Lorenz; Winterbottom, Phil (1998). "Very concurrent mark-&-sweep garbage collection without fine-grain synchronization" (PDF). Proceedings of the First International Symposium on Memory Management - ISMM '98. pp. 166–175. doi:10.1145/286860.286878. ISBN 1-58113114-3. S2CID 14399427. Archived (PDF) from the original on 13 May 2008.
  • 43"GC FAQ".
  • 44Lieberman, Henry; Hewitt, Carl (1983). "A real-time garbage collector based on the lifetimes of objects". Communications of the ACM. 26 (6): 419–429. doi:10.1145/358141.358147. hdl:1721.1/6335. S2CID 14161480.
  • 45Baker, Henry G. (1978). "List processing in real time on a serial computer". Communications of the ACM. 21 (4): 280–294. doi:10.1145/359460.359470. hdl:1721.1/41976. S2CID 17661259. see also description
  • 46McCloskey; Bacon; Cheng; Grove (2008), Staccato: A Parallel and Concurrent Real-time Compacting Garbage Collector for Multiprocessors (PDF), archived (PDF) from the original on 11 March 2014
  • doi
    10.1007/bfb0017182
    ISBN
    3-540-55940-X
    {{cite book}}
    |journal=
  • Wilson, Paul R.; Johnstone, Mark S.; Neely, Michael; Boles, David (1995). "Dynamic Storage Allocation: A Survey and Critical Review". Memory Management. Lecture Notes in Computer Science. Vol. 986 (1 ed.). pp. 1–116. doi:10.1007/3-540-60368-9_19. ISBN 978-3-540-60368-9. {{cite book}}: |journal= ignored (help)
  • Created
    19 Oct 2001
    History
    1,392 edits
    736 contributors
    1 edit in the last 30 days
    Last edited
    9 Nov 2026

    1,392 revisions in total · 736 contributors · +7 / 0 bytes across 1 edits by 1 contributor in the last 30 days

    1. 9 Nov 2026, 02:06 UTCGreenC botMove 1 url. Wayback Medic 2.5 per WP:URLREQ#arstechnica.com PassA+7diff
    2. 4 Sept 2026, 19:01 UTCSumanuilNo edit summary−12diff
    3. 4 Sept 2026, 19:01 UTCSumanuilFile names don't use those tags.−1diff
    4. 4 Sept 2026, 18:52 UTCDawnseeker2000mdate format audit, simplify links, minor formatting, unlink common terms, refine ref details, MOS:GEOLINK, BBC News/Sport are divisions of the BBC, etc., CS1 errors: deprecated parameters−438diff
    5. 12 Jul 2026, 11:08 UTCTemporary account§ C and C++ rename mark and sweep garbage collection to tracing garbage collection, in line with how it is introduced earlier in the article−7diff
    6. 22 Apr 2026, 10:43 UTCMrCiteYourSourcesRemove citation needed in the overview since its now included as a page tag−49diff
    7. 22 Apr 2026, 10:42 UTCMrCiteYourSourcesAdded {{More citations needed}} and {{More footnotes needed}} tags+106diff
    8. 22 Apr 2026, 10:41 UTCMrCiteYourSourcesmAdd source for tracing garbage collection+216diff

    View full revision history

    Created
    19 Oct 2001
    History
    1,392 edits
    736 contributors
    1 edit in the last 30 days
    Last edited
    9 Nov 2026

    Go deeper: linked from this article

    • Listed under See also

      Write amplification

      Phenomenon associated with solid state storage

      Write amplification (WA) is an undesirable phenomenon associated with flash memory and solid-state drives (SSDs) where the actual amount of information physically written to the storage media is a multiple of the logical amount intended to be written.

      18 min readGo deeper
    • Listed under See also

      Destructor (computer programming)

      Function called at the end of an object's lifetime

      In object-oriented programming, a destructor (sometimes abbreviated dtor) is a method which is invoked mechanically just before the memory of the object is released.

      13 min readGo deeper
    • Listed under See also

      Virtual memory compression

      Algorithms for compressing in-memory data

      Virtual memory compression (also referred to as RAM compression and memory compression) is a memory management technique that utilizes data compression to reduce the size or number of paging requests to and from the auxiliary storage.

      9 min readGo deeper
    • Listed under See also

      Smart pointer

      Data type simulating a pointer with additional features

      In computer science, a smart pointer is an abstract data type that simulates a pointer while providing added features, such as automatic memory management or bounds checking.

      8 min readGo deeper
    • Listed under See also

      Dead-code elimination

      Compiler optimization to remove code which does not affect the program results

      In compiler theory, dead-code elimination (DCE, dead-code removal, dead-code stripping, or dead-code strip) is a compiler optimization to remove dead code (code that does not affect the program results).

      10 min readGo deeper
    • Linked from the introduction

      Region-based memory management

      Memory allocation scheme

      In computer science, region-based memory management is a type of memory management in which each allocated object is assigned to a region.

      11 min readGo deeper
    • Linked from the introduction

      Lisp (programming language)

      Programming language family

      Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized prefix notation.

      32 min readGo deeper
    • Linked from the introduction

      Manual memory management

      Computer memory management methodology

      In computer science, manual memory management refers to the usage of manual instructions by the programmer to identify and deallocate unused objects, or garbage.

      6 min readGo deeper
    • Linked from the introduction

      Computer file

      Computer resource for recording data on a storage device

      A computer file is a named collection of data treated as a unit by the system that manages it. Today, this system is called a file system.

      12 min readGo deeper
    • Linked from the introduction

      Network socket

      Software-based endpoint of network communications

      A network socket is a software structure within a network node of a computer network that serves as an endpoint for sending and receiving data across the network.

      8 min readGo deeper
    • Linked from the introduction

      Method (computer programming)

      Function that is tied to a particular instance or class

      A method in object-oriented programming (OOP) is a procedure associated with an object, and generally also a message.

      6 min readGo deeper
    • Linked from the introduction

      Memory management

      Computer memory management methodology

      Memory management (also dynamic memory management, dynamic storage allocation, or dynamic memory allocation) is a form of resource management applied to computer memory.

      10 min readGo deeper

    Also read: what people and readers pair with this article

    • Where Wikipedia readers go next · Recommended 1 time

      Tracing garbage collection

      Form of computer memory management

      In computer programming, tracing garbage collection is a form of automatic memory management that consists of determining which objects should be deallocated ("garbage collected") by tracing which…

      14 min readGo deeper

    Adjacent: shared categories and similar text

    • Linked in “Overview”

      Lambda calculus

      Mathematical-logic system

      In mathematical logic, the lambda calculus (also written as λ-calculus) is a formal system for expressing computation based on function abstraction and application using variable binding and substitution.

      28 min readGo deeper