| Summary: | [Viewers] org.eclipse.jface.viewers.TreeColumnViewerLabelProvider should call dispose of passed IBaseLabelProvider | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Sushant Sirsikar <sirsikar.sushant> |
| Component: | UI | Assignee: | Platform UI Triaged <platform-ui-triaged> |
| Status: | RESOLVED INVALID | QA Contact: | Hitesh <hsoliwal> |
| Severity: | normal | ||
| Priority: | P3 | CC: | remy.suen, tom.schindl |
| Version: | 3.5.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
You can workaround the code by disposing the label provider manually when needed. Does the LabelProvider API-Doc say that it is illegal to attach the same instance to multiple columns? If the answer is NO we can't simply call dispose :-( Considering comment #1 and comment #2, updating severity to a realistic value. In fact considering Toms comment, and the fact that you can sub class TreeColumnViewerLabelProvider to override dispose, I would say this is an not a bug. I intend to mark it as INVALID. Marking as INVALID. Read comments above. |
Build Identifier: M20090211-1700 When we create instance of org.eclipse.jface.viewers.TreeColumnViewerLabelProvider, we pass IBaseLabelProvider instance in it’s constructor. Please look following code snippet. public class TreeColumnViewerLabelProvider extends TableColumnViewerLabelProvider { … … ... /** * Create a new instance of the receiver with the supplied labelProvider. * * @param labelProvider */ public TreeColumnViewerLabelProvider(IBaseLabelProvider labelProvider) { super(labelProvider); } .... ..... ....... } When dispose method of TreeColumnViewerLableProvider is called, then dispose method of passed IBaseLabelProvider should be called automatically. Dispose method of IBaseLabelProvider can contain cleanup code (e.g. Image object cleanup, etc) which might be very important for memory management. As current implementation doesn’t call dispose method of IBaseLabelProvider, all clean up code written into that becomes redundant. Reproducible: Always