When closing a self-loading application, the kernel calls the ExitProc function, supplied by the application developer, to reset any hardware that a dynamic-link library may have accessed. However, the ExitProc function does not need to free memory or close files.