[gwt-contrib] Re: Ensure all ProxyAutoBeans not directly referenced from root object or via a shim can be garbage-... (issue1451819)
http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/gwt/core/client/impl/WeakMapping.java File user/src/com/google/gwt/core/client/impl/WeakMapping.java (right): http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/gwt/core/client/impl/WeakMapping.java#newcode104 user/src/com/google/gwt/core/client/impl/WeakMapping.java:104: for (;;) { On 2011/06/16 00:53:37, rjrjr wrote: why is this tight loop okay? What makes the thread sleep or whatever? ReferenceQueue#remove() is blocking: http://download.oracle.com/javase/6/docs/api/java/lang/ref/ReferenceQueue.html#remove() But I wonder: isn't this change making RequestFactory incompatible with AppEngine? There must be a better way. IIUC, what WeakMapping is trying to do is a WeakHashMap where we guarantee identity comparison (whichever the actual key, thus whichever its equals() implementation). Maybe we should mimic WeakHashMap's internal behavior then: each time you access it, poll() the ReferenceQueue until it's empty. http://gwt-code-reviews.appspot.com/1451819/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Ensure all ProxyAutoBeans not directly referenced from root object or via a shim can be garbage-... (issue1451819)
But I wonder: isn't this change making RequestFactory incompatible with AppEngine? Reverting to original behavior of calling cleanup() from get()/set(). -- Bob Vawter Google Web Toolkit Team -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Ensure all ProxyAutoBeans not directly referenced from root object or via a shim can be garbage-... (issue1451819)
LGTM http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/gwt/core/client/impl/WeakMapping.java File user/src/com/google/gwt/core/client/impl/WeakMapping.java (right): http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/gwt/core/client/impl/WeakMapping.java#newcode104 user/src/com/google/gwt/core/client/impl/WeakMapping.java:104: for (;;) { why is this tight loop okay? What makes the thread sleep or whatever? http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/web/bindery/autobean/vm/impl/ProxyAutoBean.java File user/src/com/google/web/bindery/autobean/vm/impl/ProxyAutoBean.java (right): http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/web/bindery/autobean/vm/impl/ProxyAutoBean.java#newcode143 user/src/com/google/web/bindery/autobean/vm/impl/ProxyAutoBean.java:143: * elsewhere. The alternative is a massive memory leak. Don't understand this comment. How is it premature if nothing is referencing them? http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/web/bindery/requestfactory/server/RequestFactoryJarExtractor.java File user/src/com/google/web/bindery/requestfactory/server/RequestFactoryJarExtractor.java (right): http://gwt-code-reviews.appspot.com/1451819/diff/1/user/src/com/google/web/bindery/requestfactory/server/RequestFactoryJarExtractor.java#newcode67 user/src/com/google/web/bindery/requestfactory/server/RequestFactoryJarExtractor.java:67: import com.google.web.bindery.requestfactory.vm.testing.UrlRequestTransport; Does this file belong in this patch? http://gwt-code-reviews.appspot.com/1451819/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors