You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2005/05/17 04:00:13 UTC

[jira] Commented: (DIRMINA-41) Memory Leaks

     [ http://issues.apache.org/jira/browse/DIRMINA-41?page=comments#action_65578 ]
     
Trustin Lee commented on DIRMINA-41:
------------------------------------

I looked at the patch, and it looks very simple.  But I have a question before I apply this patch.  Please look at this part:

-        Stack[] bufferStacks = buf.isDirect()? directBufferStacks : heapBufferStacks;
-        Stack stack = bufferStacks[ getBufferStackIndex( bufferStacks, buf.capacity() ) ];
+        Stack stack;
+        if (buf.isDirect())
+        {
+               stack = directBufferStacks[ getBufferStackIndex( directBufferStacks, buf.capacity() ) ];
+        }
+        else
+        {
+               stack = heapBufferStacks[ getBufferStackIndex( heapBufferStacks, buf.capacity() ) ];
+        }
+

I don't see any differences in this patch fragment IMHO.  Any ideas?

> Memory Leaks
> ------------
>
>          Key: DIRMINA-41
>          URL: http://issues.apache.org/jira/browse/DIRMINA-41
>      Project: Directory MINA
>         Type: Bug
>     Versions: 0.7
>     Reporter: elliot schlegelmilch
>     Assignee: Trustin Lee
>  Attachments: bytebuffer.patch
>
> Discovered by adding 10,000 users and searching repeatedly. Ran in profiler and compared mid search to post search to find many objects aren't getting gc'd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira