Everything about Finalizer
In programming, a special method executed during object destruction
In computer science, a finalizer or finalize method is a special method that performs finalization, generally some form of cleanup. A finalizer is executed during object destruction, prior to the object being deallocated, and is complementary to an initializer, which is executed during object creation, following allocation. Finalizers are strongly discouraged by some, due to difficulty in proper use and the complexity they add, and alternatives are suggested instead, mainly the dispose pattern. Wikipedia →
đź§ Start here: a 6-step reading path
- Read the overview: FinalizerA 5-minute orientation
- Pick up a classic book: Reverse DesignThe most-reprinted book on the subject
- Read the landmark paper: Garbage Collection for Rust: The Finalizer FrontierCited 1 times
- Go sideways: Resource acquisition is initializationA closely related topic
- Go sideways: Dispose patternA closely related topic
đź“– Definitions
Noun A function that runs when an object is garbage collected, similar to a destructor.
🏆 Landmark papers (most cited)
📚 Books worth reading
Reverse DesignPatrick Holleman · 2018
The Spiderwick ChroniclesTony DiTerlizzi, Holly Black · 2004
Apple Pro Training SeriesDiana Weynand · 2003
A Happy Meeting (Betty Neels Large Print Collection)Betty Neels · 1968
Choose Your Own Adventure - Your Code Name is JonahEdward Packard · 1979
The craft of the cutMarios Chirtou · 2012
FinaleThomas E. Rudolph, Vincent A. Jr. Leonard · 2001
Evapotranspiration covers for landfills and waste sitesVictor L. Hauser · 2009
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
đź”— Related topics
- Resource acquisition is initialization Resource acquisition is initialization (RAII) is a programming idiom used in several object-oriented, statically typed programming languages to describe…
- Dispose pattern In object-oriented programming, the dispose pattern is a design pattern for resource management. In this pattern, a resource is held by an object, and…
- Destructor (computer programming) In object-oriented programming, a destructor (sometimes abbreviated dtor) is a method which is invoked mechanically just before the memory of the object…
- Resource management (computing) In computer programming, resource management refers to techniques for managing resources (components with limited availability). Computer programs may…
- Object lifetime In object-oriented programming (OOP), object lifetime is the period of time between an object's creation and its destruction. In some programming contexts…
- Manual memory management In computer science, manual memory management refers to the usage of manual instructions by the programmer to identify and deallocate unused objects, or…
- C++/CLI C++/CLI is a variant of the C++ programming language, modified for Common Language Infrastructure. It has been part of Visual Studio 2005 and later, and…
- Comparison of Java and C++ Java and C++ are two prominent object-oriented programming languages. By many language popularity metrics, the two languages have dominated object-oriented…