Find the word definition

Wiktionary
finalizer

n. (context computing programming English) A function that runs when an object is garbage collected, similar to a destructor.

Wikipedia
Finalizer

In object-oriented programming, 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 many, due to difficulty in proper use and the complexity they add, and alternatives are suggested instead, primarily the dispose pattern – see problems with finalizers.

The term "finalizer" is primarily used in object-oriented languages that use garbage collection, of which the archetype is Java. This is contrasted with a " destructor", which is a method called for finalization in languages with deterministic object lifetimes, archetypically C++. These are generally exclusive – a language will have either finalizers (if garbage collected) or destructors (if deterministic), but in rare cases a language may have both, as in C++/CLI and D, and in case of reference counting (instead of tracing garbage collection), terminology varies. In technical usage, "finalizer" may also be used to refer to destructors, as these also perform finalization, and some subtler distinctions are drawn – see terminology. For this article, "finalizer" refers only to a method used for finalization in a garbage-collected language; for discussion of finalization generally, see finalization.

Finalizer (video game)

Finalizer is a shooter arcade game developed by Konami in 1985. You control a jet shooter and fly through several different states in America shooting different enemies.