Phonegap Garbage Collection
Solution 1:
Before the answer, I'd like to clarify a point. There isn't a global "JavaScript garbage collector" for all browsers, each JavaScript implementation has a different method for handling it. While I'd guess that most implementations are very similar, how garbage collection happens could differ between Firefox, Chrome, Safari, etc. based on the underlying engine.
A PhoneGap app is essentially a wrapper around a specialized native view that can render HTML and run JavaScript. For Android, this is a WebView, based on the Android Browser. For iOS, it's a similar setup which uses Mobile Safari's engine. Each platform will have its own way of running your code.
Marrying these two points, PhongGap doesn't contain any explicit garbage collection because it is already implemented in the underlying web engine. An Android PhoneGap Application will use Android Browser garbage collection, an iOS PhoneGap App will use Safari garbage collection, etc. While you can be reasonably certain that garbage collection will occur with your PhoneGap app, you may see different results between platforms.
Post a Comment for "Phonegap Garbage Collection"