geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-190) ReflectionBasedAutoSerializer leaks heap memory every time the Geode cache is closed
Date Mon, 10 Aug 2015 21:02:46 GMT

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

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

Commit 1c7cbb2d1c56f66f76370ebd82a44a90d3c4e7e1 in incubator-geode's branch refs/heads/develop
from [~dschneider]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=1c7cbb2 ]

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)

Mime
View raw message