[ 
https://issues.apache.org/jira/browse/GEODE-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14660631#comment-14660631
 ] 

ASF subversion and git services commented on GEODE-190:
-------------------------------------------------------

Commit 6cb4a5682667eacc0017898b81367c3e5029c888 in incubator-geode's branch 
refs/heads/feature/GEODE-190 from [~dschneider]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;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: https://issues.apache.org/jira/browse/GEODE-190
>             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
(v6.3.4#6332)

Reply via email to