Home News Forum Social Networking Support Us Advertise

Spanish Lesson 1 ($1.99)

aWake!Gently ($1.99)

The Bird & The Snail - Knock Knock - Deluxe ($4.99)

Match-It Trains ($0.99)

Tangled ($0.99)

iFlatter ($0.99)

The 15 puzzle ($0.99)

Tap Forms Database ($8.99)

Higher or Lower Card Game (Hi Lo) ($0.99)

Red Pixel ($0.99)

Time-Shift Radio ($0.99)

Want your application advertised here? Only $10/week!

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-06-2009, 01:33 PM   #1 (permalink)
Lost in a sea of code
iPhone Dev SDK Supporter
 
BostonMerlin's Avatar
 
Join Date: Apr 2008
Location: Boston
Posts: 368
Rep Power: 0
BostonMerlin is an unknown quantity at this point
Default Low memory warning until reboot

i've heard of some graphics intensive games needing to be rebooted prior to running else crashes would occur.

My app (like many) uses a heavy dose of tableviews to perform most of it's functions. Lately my apps been causing memory warning after navigating through a series of screens. i could replicate the hit on memory by accessing nine table levels in a row. over and over i could cause my 3g to issue a memory warning. each time, exit the app, restart the app and replicate the problem (not in debug mode or instruments.. just on it's own).

if i reboot my 3g, run the app, do the same thing.. no problem.. no warnings. Can anyone shed light on why this happens? I'm sure i have leaks hanging around that i need to fix but why would a reboot fix the problem? Would you think it possible that xcode leaves debugger stubs on the device that might cause some of these issues?

anyone else experiencing this? Thoughts?

Thanks,
John
__________________
----------------------------------------------------------------------
I love being a dad, flying airplanes and writing code.
----------------------------------------------------------------------
Follow me on Twitter: @BostonMerlin
----------------------------------------------------------------------
iPhone Apps: The Pilots Library

Last edited by BostonMerlin; 01-06-2009 at 02:07 PM.
BostonMerlin is offline   Reply With Quote
Old 01-06-2009, 02:17 PM   #2 (permalink)
Magic Hands' Daddy
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 21
Posts: 740
Rep Power: 1
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

just b/c your app doesnt have leaks does not mean that other apps that you use don't have leaks.

When you run other apps, they leak. Then your app is left with less memory to work with.

Rebooting causes memory to be cleared, so now if you test your app on a fresh device, you'll find that you have much more memory to work with.
__________________
Games
7 Deaths In Nagamachi (New!)
Segment v1.1
ThumStruck (v1.2)
ThumStruck Free (v1.4)
Elvis Mobile v1.0

Apps
DataLoss DB - (New!)
Try Something New - (New!)
Lovers & Haters - coming soon
smithdale87 is offline   Reply With Quote
Old 01-06-2009, 02:31 PM   #3 (permalink)
Senior Member
 
Join Date: Sep 2008
Posts: 1,431
Rep Power: 2
PhoneyDeveloper is on a distinguished road
Default

Do you use IB and do you release outlets? Not doing this correctly will lead to memory warnings.
PhoneyDeveloper is offline   Reply With Quote
Old 01-06-2009, 02:32 PM   #4 (permalink)
Senior Member
 
tkilmer's Avatar
 
Join Date: May 2008
Posts: 575
Rep Power: 0
tkilmer is an unknown quantity at this point
Default

The iPhone OS is suppose to reclaim memory after an application is closed. It does not always work like it should.
tkilmer is offline   Reply With Quote
Old 01-06-2009, 02:38 PM   #5 (permalink)
Lost in a sea of code
iPhone Dev SDK Supporter
 
BostonMerlin's Avatar
 
Join Date: Apr 2008
Location: Boston
Posts: 368
Rep Power: 0
BostonMerlin is an unknown quantity at this point
Default

The crux of my question was related to why would reseting the device cause those memory warnings of mine to go away.

I was under the assumption that the device was designed to place apps in their own sandbox so as not to bring down the phone when a single app runs amuck.

Rebooting causes my memory warnings to go away when the only thing i'm doing with this device is testing a single app.

Thanks
John
__________________
----------------------------------------------------------------------
I love being a dad, flying airplanes and writing code.
----------------------------------------------------------------------
Follow me on Twitter: @BostonMerlin
----------------------------------------------------------------------
iPhone Apps: The Pilots Library
BostonMerlin is offline   Reply With Quote
Old 01-07-2009, 07:23 AM   #6 (permalink)
Senior Member
 
Join Date: Oct 2008
Posts: 429
Rep Power: 1
CommanderData is on a distinguished road
Default

You're forgetting about Apple's own apps! Mail and Safari DO NOT actually close down and free up memory when you exit to the home screen. That has proven to be the cause of 98% of my memory issues. Try it yourself... do not reboot the phone next time you can replicate the low-memory warning... instead open Safari and force-quit it by *holding* the home button for 6-8 seconds (until Safari finally disappears). Do the same thing for Mail. Now try your app again... you probably (as in I'd place bets!) wont have a memory warning after that.
CommanderData is offline   Reply With Quote
Old 01-07-2009, 10:25 AM   #7 (permalink)
Senior Member
 
Join Date: Sep 2008
Posts: 1,431
Rep Power: 2
PhoneyDeveloper is on a distinguished road
Default

You need to use the performance tools to see memory usage. You can see how much is used by all the apps running on the device. Also look in the console for messages about memory usage.

My observations are these. When your app gets memory warnings the background apps are also getting them. The OS will kill some of the background apps before it kills your app. Springboard can increase in size also and I think it won't be killed.

The main point is that you need to make your app run in a small footprint and respond well to memory warnings. You obviously have no control over other apps. Some game vendors tell their users to reboot the device before running their app but this seems cheesy to me. If your app is using too much memory simply by pushing and popping view controllers then that's a problem with your app.
PhoneyDeveloper is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements


» Stats
Members: 8,229
Threads: 20,197
Posts: 90,213
Top Poster: RickMaddy (2,121)
Welcome to our newest member, jrsiqueira
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:07 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0