Is there a way to ensure that all memory is release once my app has been closed?

I appreciate any time or effort spent on your reply,
Darkcloud