15 Sep 2010 10:40 PM #1
Question: GXT and memory
I was just wondering how JS compiled with GXT is managed in memory by the browser?
I ran some tests in Chromium with ProcessExplorer, creating an object and then deleting all references to it, doing it in a loop, and I got a nice ramp. Aren't objects supposed to be deleted from memory when they're not referenced anymore?
I'm concerned this might lead to memory leaks in large multi-screen applications, but again, this is a mere question, I'm just trying to understand how it works...
16 Sep 2010 1:13 AM #2
We are using the GWT detach/attach model to remove all event listener again. Where do you have a leak? Are you using a widget?
16 Sep 2010 1:17 AM #3
It was just a brutal trial creating a widget, never attaching it and destroying the reference.
I am under the impression that objects which are created are never destroyed, but I hadn't time to run a thorough test yet. We plan to use a scripting tool to automate navigation in our application and see how it will react. I'll know better then...
16 Sep 2010 1:24 AM #4
Destroying the reference, means set it to null? We are not doing anything with these (we cannot) and the GWT compiler isnt doing anything either.
The garbage collector of the browser should take care of this, as long as the widget is not attached and not referenced anywhere else.
16 Sep 2010 2:09 AM #5
Yes, I set the pointer to null. In Java, this means the object is eligible for garbage collection.
By gimler in forum Community DiscussionReplies: 1Last Post: 30 Jan 2008, 11:31 AM
By mglaser in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 27 Oct 2007, 11:22 PM
By garyng in forum Community DiscussionReplies: 37Last Post: 24 Apr 2007, 6:36 AM