Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-161

dynamic regions leak memory upon dispose due to ShrinkerTask

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: jcs-2.0-beta-1
    • Fix Version/s: jcs-2.0-beta-2
    • Component/s: Composite Cache
    • Labels:
      None

      Description

      Creating a dynamic region via JCS.defineRegion and then destroying it via ComposeCacheManager.free does not fully reclaim all memory when the memory shrinker is enabled.

      When shrinking is enabled, the org.apache.commons.jcs.engine.memory.shrinking.ShrinkerThread retains a pointer to CompositeCache which is never reclaimed.

      A simple solution would be to have org.apache.commons.jcs.engine.control.CompositeCache.setScheduledExecutorService(ScheduledExecutorService) retain the ScheduledFuture as a field. When CompositeCache.disposed is called, we should call ScheduledFuture.cancel.

        Attachments

          Activity

            People

            • Assignee:
              tv Thomas Vandahl
              Reporter:
              rpmcfong Ryan Fong

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment