If my application doesn't use a lot of memory, can I ignore viewDidUnload:?

My iPhone app generally uses under 5MB of living memory and even in the most extreme conditions stays under 8MB. The iPhone 2G has 128MB of RAM and from what I've read an app should only expect to have 20-30MB to use.

Given that I never expect to get anywhere near the memory limit, do I need to care about memory warnings and setting objects to nil in viewDidUnload:? The only way I see my app getting memory warnings is if something else on the phone is screwing with the memory, in which case the entire phone would be acting silly. I built my app without ever using viewDidUnload:, so there's more than a hundred classes that I'd need to inspect and add code to if I did need to implement it.

Answers


Yes, please free all memory that you don't use!

Behaviours like this are one of the reasons Apple doesn't allow multiple Apps to run at the same time. Now imagine sometimes they will and all programs would be written like this...


Need Your Help

how do one decide a design pattern for the technology he uses?

java spring design-patterns java-ee ejb

Consider struts + spring + jpa for these technology one decide that he need a service locator design pattern, sessionfacade and so on....

how to write a JSP page that received data from an XML RESTful web service?

javascript html xml ajax rest

I have a fair amount of JSP and JSF experience. Not so much with Javascript and AJAX.