Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

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

Reply
 
LinkBack Thread Tools Display Modes
Old 12-16-2009, 04:03 AM   #1 (permalink)
Divine avenger
 
Johanovski's Avatar
 
Join Date: Nov 2009
Location: Vic, Catalunya (Spain)
Posts: 320
Default Is my app's living memory normal?

Hi there!

I've been testing my app in Instruments looking for object allocations. In some passages of the game the iPhone throws a memory warning (basically in the scores screen, the game is entirely OpenGL based but a UITextField is shown in this screen -and the iPhone keyboard too-, and when it happens memory increases dramatically), and I'm wondering if this is normal or if it can be solved in any way...
My app consumes around 15 MB of living bytes (starts with 8 MB in the menu and grows up to 12 MB when the game starts, then memory slightly increases as the game time passes), so the device still have around 20-30 MB of free space, but when the UITextField and the keyboard are shown the device free space is around 10 or 6 MB, so a memory warning is thrown (however, when the UITextField is removed free space grows again to 20, more or less.

Anyone knows anything about this? It's my first iPhone app and I'm sure I'm not doing as well as it can be done so I don't think a 2D game like this can reach iPhone's maximum possibilities...

Thanks!
Johanovski is offline   Reply With Quote
Old 12-16-2009, 11:33 AM   #2 (permalink)
Registered Member
 
scotopia's Avatar
 
Join Date: Oct 2008
Posts: 2,028
Default

The fact that you said that memory continually increases after a certain point means you definitely have a leak; which is a problem. Also; your total memory should never be above 20MB total (and that's already seriously pushing it).
scotopia is offline   Reply With Quote
Old 12-16-2009, 12:13 PM   #3 (permalink)
Divine avenger
 
Johanovski's Avatar
 
Join Date: Nov 2009
Location: Vic, Catalunya (Spain)
Posts: 320
Default

Hi there!

I've been just to answer you when the inspiration comes... Just at the beginning of the game there are ten leaks caused by a class I've made and then I've remembered that I've been using some time ago two instances of that class which gets updated every second, so leaks may come from there (however Instruments doesn't found it as leaks and never told me) and, after disabling them... Voilą!

Thanks!
Johanovski is offline   Reply With Quote
Reply

Bookmarks

Tags
live bytes, memory, ram

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
» Online Users: 280
16 members and 264 guests
@sandris, ADY, dacapo, Dani77, djohnson, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, timle8n1, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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