[jboss-jira] [JBoss JIRA] Commented: (JBREM-721) Fix memory leaks in bisocket transport and LeasePinger

Ron Sigal (JIRA) jira-events at lists.jboss.org
Sun Mar 11 17:08:46 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBREM-721?page=comments#action_12355766 ] 
            
Ron Sigal commented on JBREM-721:
---------------------------------

The bisocket static maps are managed more carefully, and a unit test has been added to org.jboss.test.remoting.transport.bisocket.BisocketTestCase.

The TimerTasks in the bisocket transport, and also in LeasePinger, have been turned into static classes.

A program with a loop in which bisocket connections and callback connections were created and destroyed was run in jprofiler, and there didn't seem to be any further memory leaks.

Waiting for cruisecontrol results.

> Fix memory leaks in bisocket transport and LeasePinger
> ------------------------------------------------------
>
>                 Key: JBREM-721
>                 URL: http://jira.jboss.com/jira/browse/JBREM-721
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions:  2.2.0.Beta1 (Bluto)
>            Reporter: Ron Sigal
>         Assigned To: Ron Sigal
>             Fix For:  2.2.0.Beta1 (Bluto)
>
>
> 1. The bisocket transport is failing to remove unused objects from static maps.
> Also, it seems that calling cancel() on a TimerTask marks it as cancelled, but it doesn't remove the TimerTask from the Timer's heap until the TImerTask comes to the head of the heap.  Therefore, a busy Timer could keep TimerTasks around for a while with references to objects that cannot be garbage collected.  To prevent this problem, TImerTasks should be defined as static classes, with all of the objects it needs from the outer class passed in to the constructor.  When the TimerTask is cancelled, it should set its instance variables to null.  
> 2. Bisocket uses some TimerTasks.
> 3. LeasePinger uses some TimerTasks.

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

        



More information about the jboss-jira mailing list