| Summary: | AbstractChannel.listeners_array leaks listener instances | ||
|---|---|---|---|
| Product: | [Tools] TCF | Reporter: | Anton Leherbauer <aleherb+eclipse> |
| Component: | Core | Assignee: | Project Inbox <tcf.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | Eugene Tarassov <eugene> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, mober.at+eclipse |
| Version: | 1.0 | ||
| Target Milestone: | 1.0.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Anton Leherbauer
I have both removed "static" and changed the code to clear the array when the channel is closed or a listener is removed. There is one problem, though: If a listener removes itself when it receives onChannelClosed(), all subsequent listeners will not receive the notification because the listeners_array is cleared. Good catch. Looks like the original idea of reusing the array was wrong - it does not worth all the trouble. I have removed listeners_array and changed the code to create temporary array each time listeners are called. Thanks! It looks like this was committed to master only, but not to 0.5.0 - is this intentional? http://git.eclipse.org/c/tcf/org.eclipse.tcf.git/commit/?id=da88b9a9263f5a97b98112dd7a600ffaf331a181 (In reply to comment #4) > It looks like this was committed to master only, but not to 0.5.0 - is this > intentional? The issue looks noncritical to me, but the fix can easily be backported to 0.5.0 if anyone needs it. |