June 2018
Intermediate to advanced
316 pages
6h 34m
English
Finalization is a process of releasing resources. It's executed with a finalizer method that's invoked after an object becomes unreachable, but before its memory is deallocated. Finalization is a non-deterministic process because it's not known when garbage collection will occur, and it might never happen. This is in contrast to a destructor, which is a method called for finalization in languages with manual memory management.
The following diagram illustrates the simplified life cycle of an object:

A destructor, in most languages, is the language-level term that means a method defined in a class by a programmer. A finalizer
Read now
Unlock full access