• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ERXThreadStorage memory leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXThreadStorage memory leak


  • Subject: Re: ERXThreadStorage memory leak
  • From: Raymond NANEON <email@hidden>
  • Date: Fri, 25 Apr 2014 18:48:58 +0200

Hi Alexis,

Thanks for sharing. 
I go to put the solution in my apps properties.

Chuss

Ray

Envoyé de mon iPad

Le 25 avr. 2014 à 16:39, Alexis Tual <email@hidden> a écrit :

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 (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >ERXThreadStorage memory leak (From: Alexis Tual <email@hidden>)

  • Prev by Date: Re: How to create a non-web EOF application
  • Next by Date: Re: Mixing and matching prototypes
  • Previous by thread: ERXThreadStorage memory leak
  • Next by thread: How to create a non-web EOF application
  • Index(es):
    • Date
    • Thread