Revision: 6921 Author: [email protected] Date: Mon Nov 16 12:30:06 2009 Log: Fix memory leak in XMLHttpRequest.clearOnReadyStateChange(). Resolves http://code.google.com/p/google-web-toolkit/issues/detail?id=4133
Patch by: bobv Review by: rjrjr Reported by: lyle.sitzman http://code.google.com/p/google-web-toolkit/source/detail?r=6921 Modified: /trunk/user/src/com/google/gwt/xhr/client/XMLHttpRequest.java ======================================= --- /trunk/user/src/com/google/gwt/xhr/client/XMLHttpRequest.java Wed Oct 28 09:10:53 2009 +++ /trunk/user/src/com/google/gwt/xhr/client/XMLHttpRequest.java Mon Nov 16 12:30:06 2009 @@ -111,8 +111,9 @@ * @see http://www.w3.org/TR/XMLHttpRequest/#onreadystatechange */ public final native void clearOnReadyStateChange() /*-{ + var self = this; $wnd.setTimeout(function() { - this.onreadystatechange = function(){}; + self.onreadystatechange = @null::nullMethod(); }, 0); }-*/; -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
