http://gwt-code-reviews.appspot.com/1388803/diff/3004/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java File dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java (right):
http://gwt-code-reviews.appspot.com/1388803/diff/3004/dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java#newcode97 dev/core/src/com/google/gwt/dev/resource/impl/ZipFileClassPathEntry.java:97: private final Map<PathPrefixSet, ZipFileSnapshot> cachedSnapshots = new ReferenceIdentityMap( The way the reference maps work, the entry gets dropped if EITHER the key or value get collected. So if you did HARD->WEAK on this, no one would be keeping a reference to the ZipFileSnapshot value, and when it became collectible, the whole entry would get nuked. WEAK->HARD is obviously the right choice here. You don't want to pin the PathPrefixSet at all (ModuleDef does that), but you do want to pin the ZipFileSnapshot for as long as the PathPrefixSet exists. http://gwt-code-reviews.appspot.com/1388803/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
