Nikita Timofeev created CAY-2876:
------------------------------------
Summary: Memory leak in the ObjectStore
Key: CAY-2876
URL: https://issues.apache.org/jira/browse/CAY-2876
Project: Cayenne
Issue Type: Bug
Components: Core Library
Affects Versions: 5.0-M1, 4.2.1, 4.2, 4.1.1, 4.1
Reporter: Nikita Timofeev
Assignee: Nikita Timofeev
Fix For: 4.2.2, 5.0-M2
Under some use cases default {{ObjectStore}} implementation could lead to a
considerable memory leak.
Conditions are following:
# Cayenne objects use flattened attributes
# Application uses a shared readonly context that is never cleaned or removed
If those conditions are met {{ObjectStore.trackedFlattenedPaths}} just slowly
grows (speed depends on how many different objects with flattened paths are
loaded) and never freed.
NOTE: {{ObjectStore.objectMap}} grows too in this case, but it's a weak-ref
based map by default, so it's memory is actually reclaimed by the JVM, while
{{ObjectStore.trackedFlattenedPaths}} is just a regular {{ConcurrentHashMap}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)