
Common Language Runtime • Chapter 4 165
classes, you could write code in the Terminate event of the class and feel com-
fortable knowing that after the object was destroyed, the code in that event
would fire immediately.This is known as deterministic finalization. With the intro-
duction of Garbage Collector, this is no longer the case. Now we are dealing
with non-deterministic finalization—we can not predetermine the exact time when
the finalization for an object will occur.This probably raises a few brows. Many
developers have come to rely upon the Terminate event to perform other main-
tenance or cleanup routines within their applications.With the intr ...