| Summary: | Memory leak in JobManagerAdapter (1) | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Loïc Bertholet <loic.bertholet> |
| Component: | Workbench | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | irbull |
| Version: | 1.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 281289 *** |
Environment : RAP 1.2-M6 / Tomcat, Jetty / FF 3.0.9, IE 7 / Window XP Steps to reproduce: * Create and Run a Job on for example an EditorPart * Open this EditorPart an make the Job running. * The Job is put in the JobManagerAdapter Map named jobs and is not removed until the user session ends. It creates memory leak because when the EditorPart is closed, as the Job is still contained by the JobManagerAdapter, the EditorPart (and all its fields) can't be garbage collected. Expected: The Job should be removed from the JobManagerAdapter jobs when it is done. But the JobManagerAdapter done method has the following code : if( !job.shouldSchedule() ) { jobs.remove( job ); } As Job.shouldSchedule() always returns true, it is never removed. A workaround is to override the created Job souldSchedule() method but as this behavior differs from RCP, I consider it as a bug.