Everything About ___
Live briefing

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

  1. Read the overview: FinalizerA 5-minute orientation
  2. Pick up a classic book: Reverse DesignThe most-reprinted book on the subject
  3. Read the landmark paper: Garbage Collection for Rust: The Finalizer FrontierCited 1 times
  4. Go sideways: Resource acquisition is initializationA closely related topic
  5. 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

Ranked by number of editions on Open Library, a rough measure of how lasting a book is.

đź”— Related topics