(.net) CriticalFinalizerObject - What does it really do?

.net, c#, dispose, finalizer, vb.net

Solution

Chris Brumme has explained this topic in a way I'm not sure could ever be topped. :)

Problem

My understanding about this class is that you should use it when you want to be sure that the Finalizer (destructor) of the class is called, but from a couple of tests I did, it doesn't seem to be true. If it does not make sure that the dispose method is called, is there any other way of doing it? For example, if I want to make sure that some code is run to end my object, even if I close my program via Task Manager or something?

Original source