Order of finalization may be significant, and may be difficult to guarantee where one finalizable object weakly references another since there is no notion of ownership. Known Uses GraphicsTool. Finalization is used to ensure the file is closed. Finalization is used to ensure that the streams buffers are flushed to the underlying medium. Finalization is used to ensure the process is correctly terminated so that any unwind blocks are run.
Finalization is used to ensure that memory allocated from external heaps is returned.
Related Patterns Finalization is most appropriate for cases where you want to share objects owning external resources, and will typically used in conjunction with a Weak Collection .