[hibernate-dev] About Search's Threadlocal and memory leak: automatic listener registration

Emmanuel Bernard emmanuel at hibernate.org
Tue Dec 23 17:16:57 EST 2008


On  Dec 12, 2008, at 12:26, Sanne Grinovero wrote:

> Hi all,
> reading the code it appears the JIRA reporter is right: the static
> ThreadLocal is using a WeakHashMap but the value
> is holding a reference to the Configuration, which also happens to  
> be the key.
> (see SearchConfigurationFromHibernateCore 's constructor, called at
> line 30 in ContextHolder)
>

Are you sure. AFAIK SearchConfiguration references are not kept in  
SearchFactory, or am I missing something?




More information about the hibernate-dev mailing list