There are no guarantees that objects which are registered for finalization will actually be finalized before the application exits. This is not a problem on many operating systems, which free any resources held by a process when it exits.
Where it is necessary to guarantee an action at the time the application exits, you should use a more explicit mechanism.