4

I'm embarking on a Sencha Touch/PhoneGap project for iOS. The project will be image/movie heavy, the problem is that I'm not clear how you manage those images in terms of what's cached. Is it done for you?

I've written a few image heavy Objective-C iOS apps and memory management has always been a key concern. I can't see how this translates to the PhoneGap platform, am I worrying about nothing?

The scenario would be that as I remove a HTML element, what would happen to the associated image/video files, either as a HTML src or as a CSS property (like background-image)?

a. The related image/movie files are removed from the cache. (This seems unlikely, as it'd probably break preloading)

b. The all files are in a cache queue, as the cache fills up, the oldest files are removed to free up space. (I'm routing for this one)

c. Nothing the app just gets really bloated and fails when it's too big.

d. Something else. Please don't just say 'something else', I'd really like to know what happens. :)

NOTE: All the image/movie files will be contained within the app. No resources will be downloaded from a server.

Thanks in advance,

Rich

kim3er
  • 6,306
  • 4
  • 41
  • 69
  • Will you be serving images off a server? Or packaging them within your Phonegap app? Or both? – ballmw May 26 '11 at 15:21
  • Sorry, I forgot to say. All the content will be packaged within the app. – kim3er May 26 '11 at 15:45
  • Here's a couple related questions: http://stackoverflow.com/questions/2986039/ipad-iphone-browser-crashing-when-loading-images-in-javascript – ballmw May 26 '11 at 16:57
  • http://stackoverflow.com/questions/3487657/memory-warnings-crashing-with-phonegap-ipad-app – ballmw May 26 '11 at 16:57

1 Answers1

1

c. Nothing the app just gets really bloated and fails when it's too big.

I've only crashed devices because of a javascript footprint that was too big. The page is loading, then crashes the browser. PhoneGap probably helps with this (packaging Sencha Touch into PhoneGap is really easy).

Jack9C
  • 26
  • 1
  • I have the exact same scenario as kim3er and I'm experiencing exactly what Jack9C says. Profiler shows no memory leaks in the application, but it never seems to release memory. The longer I run the app, the more memory that gets consumed. – SomethingOn Jan 19 '13 at 14:38