Hello,

just wanted to share this bug with the community, in fact it's a java "bug"
(or misconception) causing memory leaks :

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6501120

With wonder, if you use ERXThreadStorage and inheritable thread storage
(the default), threads created later (even by third party libraries you
don't even know) will inherit the threadlocal.
This can cause huge memory leaks, for example ERXSession.session() is based
on ERXThreadStorage... (if you use WOInject with SessionScoped, you're in
this case) so you will end up with some sessions not garbabe collected !

Solution : deactivate inheritable thread storage with
er.extensions.ERXThreadStorage.useInheritableThreadLocal=false
... but then in your own threads you won't be able to retrieve anything
from ERXThreadStorage :)

Cheers,

Alex
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to