Add finialization routines; fixed some memory leaks related to this.

Reset the SIGINT handler when the finalization is invoked.
1 file changed