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

ASF GitHub Bot commented on MNEMONIC-215:
-----------------------------------------

GitHub user johnugeorge opened a pull request:

    https://github.com/apache/incubator-mnemonic/pull/32

    MNEMONIC-215: Cleanup of memory leaks in Linkedlist implementation

    Possible memory leaks are cleaned up when Linkedlist is removed.  Verified 
that there are no memory leaks with DurableHashMapNGTest

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/johnugeorge/incubator-mnemonic master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-mnemonic/pull/32.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
    
----
commit 0a92221c7e3f4f5d58772517a0394c5580a2cf1e
Author: Johnu George <johnu...@cisco.com>
Date:   2017-03-13T20:14:25Z

    MNEMONIC-215: Cleanup of memory leaks in Linkedlist impl

----


> 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)

Reply via email to