views:

100

answers:

1

Hi,

I have written a universal app that's working fine on both iPhone (iPod Touch) and the iPad. The only difference for either platform are the nib files and the launch page graphics. Both iPad and iPhone nib files have the same functionality, just the graphics, buttons and text are bigger on the iPad.

When I run Instruments on both apps to check for memory leaks I was surprised to see that the iPad was using way less memory compared to the iPhone. And I'm trying to figure out why that's the case...? If anything, it should be the other way around, with bigger image files used for the iPad.

I'm comparing the Live Bytes figure for All Allocations in the Object Summary in Instruments.

iPad reports max around 600 KB
iPhone reports max around 3.6 MB

In both cases I'm using the real devices, not the simulator.

The higher iPhone figure is fine, doesn't cause problems, but I'm just wondering why the iPad is reporting such low figures...?

+1  A: 

Your first step is probably going to be to determine what objects exactly are taking up so much memory when running on your iPod Touch, and then to compare that to the objects present when running on your iPad.

Instruments, thankfully, makes this very easy. Use the Allocations template and you'll see a list of all the different types of allocations. From there you can click and do some data mining. If you want to learn more about Instruments, I recommend checking out the WWDC2010 videos, available for free if you're a member of the iPhone Developer Program.

Colin Barrett