On Mon, Mar 31, 2008 at 1:42 PM, kanugula <[EMAIL PROTECTED]> wrote: > > Could you clarify this?
I think you're confusing the cache of "web pages" used by the browser to avoid downloading copies of the page again, with javascript objects allocated by the application. The javascript objects need to be freed so that the browser doesn't use more and more memory, expanding eventually into virtual memory (on disk), and expanding eventually to be so large that something Bad (tm) happens (e.g. the system crashing). When you are finished using an object, the object should be destroyed. This is typically accomplished by the destructor being called. If you are manually (programatically) deciding not to use an object any longer, you should call its destructor and then set all references to that object to null. If your page unloads, qooxdoo arranges for all objects that it knows about to be destructed. The page cache that I think you're referring to is different. It is desirable that static pages (or static javascript files) be loaded only once from the server (if they haven't changed) and saved at the browser. When a page (or javascript file) is requested, the browser will look in its cache for the file and also (depending on browser settings) ask the server for the page. The server can decide that the page that the browser already has in its cache is the same as what the server has, and just tell the browser to use its cached copy. > If I jump from Atom_1.html to Atom_2.html, are the Atom_1.html objects still > stored in Page Cache? So to finally answer your question, when jumping from Atom_1 to Atom_2, Atom_1 is unloaded, which causes qooxdoo to call the destructor on all objects it knows about from the Atom_1 page. Atom_2 is loaded and it creates its objects. If Atom_2 had been loaded previously and was in the cache, it will not be re-downloaded from the server; the copy it has in its cache will be used. (There are, I think, browser settings that allow the user to specify to always use cached pages, never use cached pages, or use cached pages if they're the same as what the server has. I believe this latter setting is the default.) Hope that helps. Derrell ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
