parfait
parfait copied to clipboard
Resetting PcpMmvWriter does not clear all objects related to metrics
Calling io.pcp.parfait.dxm.BasePcpWriter#reset clears metricData but there are several references held on to PcpMetricInfos, InstanceDomains, PcpStrings and PcpValueInfos (PcpValueInfos are cleared in metricData map but there is a reference held in the perMetricByteBuffers map).
Maps/arrays/stores are as follows:
io.pcp.parfait.dxm.BasePcpWriter#metricInfoStore
io.pcp.parfait.dxm.BasePcpWriter#instanceDomainStore
io.pcp.parfait.dxm.PcpMmvWriter#stringInfo
io.pcp.parfait.dxm.BasePcpWriter#perMetricByteBuffers
These data structures should also be cleared out when #reset is called. I'm more just making a note of this at the moment. I noticed this when working on MMV v2 support but haven't tackled this object leak as part of that issue. The patch set is already fairly large.