commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ryan Fong (JIRA)" <>
Subject [jira] [Updated] (JCS-177) CompositeCacheManager leaks memory if CacheAccess.dipose is called
Date Thu, 04 May 2017 16:24:04 GMT


Ryan Fong updated JCS-177:

I have attached one possible solution that should fix this problem as jcs-177.patch. An alternative
to this is to have a pointer from CompositeCache to CompositeCacheManager so we do not incur
the overhead of incrementing and decrementing the client count.

Also find an Eclipse project that uses stock 2.1 to demonstrate how the leak occurs and how
CompositeCacheManager.freeCache avoids this issue.

> CompositeCacheManager leaks memory if CacheAccess.dipose is called
> ------------------------------------------------------------------
>                 Key: JCS-177
>                 URL:
>             Project: Commons JCS
>          Issue Type: Bug
>    Affects Versions: jcs-2.1
>            Reporter: Ryan Fong
>            Priority: Critical
>         Attachments: jcs-177.patch,
> In JCS 2.1, The org.apache.commons.jcs.engine.control.CompositeCacheManager holds onto
a reference of CacheAccess in its caches map. If CacheAccess.dispose is called, this reference
is not cleaned up which results in a memory leak.

This message was sent by Atlassian JIRA

View raw message