[ https://issues.apache.org/jira/browse/MNEMONIC-215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15923192#comment-15923192 ]
ASF GitHub Bot commented on MNEMONIC-215: ----------------------------------------- Github user bigdata-memory commented on a diff in the pull request: https://github.com/apache/incubator-mnemonic/pull/32#discussion_r105771972 --- Diff: mnemonic-core/src/main/java/org/apache/mnemonic/NonVolatileMemAllocator.java --- @@ -300,6 +300,7 @@ public void sync() { ByteBuffer bb = m_nvmasvc.retrieveByteBuffer(m_nid, getEffectiveAddress(phandler)); if (null != bb) { ret = new DurableBuffer<NonVolatileMemAllocator>(this, bb); + ret.setCollector(m_bufcollector); --- End diff -- Looks the collector would be set by register() of ResCollection, duplicated ? > Memory leak when LinkedList element is destroyed > ------------------------------------------------ > > Key: MNEMONIC-215 > URL: https://issues.apache.org/jira/browse/MNEMONIC-215 > Project: Mnemonic > Issue Type: Bug > Reporter: Johnu George > Assignee: Johnu George > Priority: Critical > Fix For: 0.6.0-incubating > > > Here is the implementation of the destroy function in LinkedList node > @Override > public void destroy() throws RetrieveDurableEntityError { > m_holder.destroy(); > if (null != m_item) { > m_item.destroy(); > m_item = null; > } > if (null != m_next) { > m_next.destroy(); > m_next = null; > } > } > Next is destroyed only when m_next is not null. m_next can also be null if > next item is not loaded into memory from PMem. It is required to first > restore the item using getNext and then call destroy. -- This message was sent by Atlassian JIRA (v6.3.15#6346)