Hi everone,
today I found the reason for a recent memory leak and I thought I'd ask what
you think of it:
Rather by accident I annotated one of the EnvironmentalShadowBuilder-methods
with @Scope(PERTHREAD)
@Scope(ScopeConstants.PERTHREAD)
public UserCacheSupport buildUserCacheSupport() {
return environmentalBuilder.build(UserCacheSupport.class);
}
(UserCacheSupport is just a custom environmental)
So I removed the annotation and everything is ok again.
But: Isn't that strange? Is that a known behavior? Using jhat I found thousands
of undead UserCacheSupport classes tied to a PlasticClassLoader. So Plastic
creates one class per request (i.e. per thread) and.. somehow keeps it. Without
the explicit @Scope setting there should also be one new object per thread, but
it does not cause a leak (since there's not a new class for each request, I
guess). I'm wondering if it's actually a bug in Tapestry?
Cheers
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]