开发者

Memory management in PhoneGap

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


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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜