I am facing a serious issue related to memory management. Before asking this question, I had search the Forums and Q&A sections. My app is based on navigation controller that contains windows which views and their child views (generally those child views are tableviews and mapviews). Application is also fetching information and images from web services.
My app works fine for starting 4 windows , But when i open 5th window, app crashes in android and iphone both due to low memory issue. I had implemented following solutions:
1- I had follow the instruction mention in http://developer.appcelerator.com/question/116867/this-is-a-solution-to-your-memory-woes . but nothing happens.
2- I had assign null values to all the variables but this does not affect the memory.
3- By using Ti.Platform.availableMemory, I have noticed that after few second garbage collector starts and release the unused memory but it works on emulator not on devices.
4- Window.close() method does not release all the associated memory.
Is there any solution left i have not implemented? I am using titanium sdk 1.7.2 and my application is for android and iphone both.
Regards, Abdul Basit
Well, that depends on your application design. Without seeing application code it's hard, if not impossible, to tell you what's the problem.
It's a common problem with navigation controller on Titanium.
It seems to have a leak. When you test in Xcode a simple navigation based app, the leak analyser detect a leak. So, when you have a real app, it often crash.
I haven't see any solution yet for this problem.
Hi, have a look at my post from yesterday: http://developer.appcelerator.com/question/127448/my-app-doesnt-free-up-objects-from-memory-checking-with-xcode-profiler
Have you checked your app with profiler or ddms?
for android, try upgrading the emulator. i was running API ver 8 with the Android Tools ver 15. Upgraing to ver 16 solved this out of memory issue for me. (It always worked fine on device, but emulator always complained and crashed). Hope that helps.
Think you can help? Login to answer this question!