geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (GEODE-190) ReflectionBasedAutoSerializer leaks heap memory every time the Geode cache is closed
Date Thu, 06 Aug 2015 19:09:04 GMT


ASF subversion and git services commented on GEODE-190:

Commit 6cb4a5682667eacc0017898b81367c3e5029c888 in incubator-geode's branch refs/heads/feature/GEODE-190
from [~dschneider]
[;h=6cb4a56 ]

GEODE-190: Fix ReflectionBasedAutoSerializer leak

A weak map value references its key keeping the key from ever being garbage.
The only reason the weak map was added was to allow internal code to get
the AutoSerializableManager given a ReflectionBasedAutoSerializer.
But the map was not really needed since the ReflectionBasedAutoSerializer
has a final field named "manager".
The only problem is that ReflectionBasedAutoSerializer is a public
api and AutoSerializableManager is internal.
This fix adds a getManager method on ReflectionBasedAutoSerializer that returns object
and is javadoc'd for "internal use only". The internal code casts the result to
AutoSerializableManager. This allows the weak map that was causing the memory leak
to be removed.

> ReflectionBasedAutoSerializer leaks heap memory every time the Geode cache is closed
> ------------------------------------------------------------------------------------
>                 Key: GEODE-190
>                 URL:
>             Project: Geode
>          Issue Type: Bug
>          Components: serialization
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Minor
> If the ReflectionBasedAutoSerializer then every time the Geode cache is closed some of
the object that should become garbage do not. They are strongly referenced. If an app repeatedly
closes and recreates the cache then this will eventually cause an OutOfMemoryException.

This message was sent by Atlassian JIRA

View raw message