Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
JavaScript Memory Consumption
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Joel Webber  
View profile  
(4 users)  More options Jan 22 2007, 8:54 am
From: "Joel Webber" <j...@google.com>
Date: Mon, 22 Jan 2007 14:54:19 +0100
Local: Mon, Jan 22 2007 8:54 am
Subject: Re: [gwt-contrib] JavaScript Memory Consumption

Memory leak issues like this is one of the many reasons we ended up building
GWT in the first place. It's possible to characterize exactly which
constructs do and do not cause leaks, but it's really tricky to maintain
real code without causing them accidentally. And as you probably noticed,
when you leak one object you tend to leak many of them because they all
reference one-another.

GWT avoids this issue altogether by enforcing a (fairly) strict mechanism
for event handling at the Widget/Element boundary. If you actually look at
the way new Widgets are created, you may wonder why events are a little
weird -- it is precisely because of this issue. The end result is that you
*cannot* leak memory in GWT without trying extra-hard. The only way you can
do so is to write your own javascript event handlers directly in JSNI, which
directly or indirectly reference java objects (please don't do this!)

On a side note, getters and setters are one of the most clearly and easily
inline-able constructs in Java, and our code generation does get rid of them
entirely in some cases. This sort of optimization will be extended even
further in the future, so feel free to write your code the way it makes the
most sense, and let the compiler do the hard part!

joel.

On 1/19/07, jonkell...@gmail.com <jonkell...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google