Hi !
I am not sure what you mean here, do mean when you exit the application ?, all memory is always released when the application terminates. Nothing can prevent this, even a bad application with lots of memory leaks is forced to release all allocated memory when it terminates.
Also, where do you get the information that all memory was not released ?
Commenter-1