DO NOT EDIT OR ANSWER THIS ISSUE. SEE THE ORIGINAL ISSUE INSTEAD:
https://www.jfire.org/modules/bugs/view.php?id=1059
ORIGINAL REPORTER: marco
Some LabelProvider implementations used in some PropertyDescriptors create Image objects on the fly and never dispose them.
ORIGINAL COMMENT BY marco, VIEW IT HERE:
https://www.jfire.org/modules/bugs/view.php?id=1059
I added some pooling in the LabelProvider implementations and implemented the ILabelProvider.dispose() method correctly to dispose all Image instances in the pool.
Unfortunately, the PropertyDescriptor framework of Eclipse seems to lack a clean resource-life-cycle. Therefore, Image objects created by the getImage() method are never disposed - even if they are pooled.
Hence, I introduced the new interface IXPropertyDescriptor (I extracted it from the existing XPropertyDescriptor). It contains onActivate() and onDeactivate() methods for a clean life-cycle. The LabelProviders are now not created in the constructors of the IXPropertyDescriptor implementations but they are created in the onActivate() methods and disposed & nulled in the onDeactivate() methods.
The new IXPropertyDescriptor is understood by the properties-view of the Editor2D. AFAIK, the property descriptors are not yet used anywhere else.
ORIGINAL COMMENT BY marco, VIEW IT HERE:
https://www.jfire.org/modules/bugs/view.php?id=1059
I added some pooling in the LabelProvider implementations and implemented the ILabelProvider.dispose() method correctly to dispose all Image instances in the pool.
Unfortunately, the PropertyDescriptor framework of Eclipse seems to lack a clean resource-life-cycle. Therefore, Image objects created by the getImage() method are never disposed - even if they are pooled.
Hence, I introduced the new interface IXPropertyDescriptor (I extracted it from the existing XPropertyDescriptor). It contains onActivate() and onDeactivate() methods for a clean life-cycle. The LabelProviders are now not created in the constructors of the IXPropertyDescriptor implementations but they are created in the onActivate() methods and disposed & nulled in the onDeactivate() methods.
The new IXPropertyDescriptor is understood by the properties-view of the Editor2D. AFAIK, the property descriptors are not yet used anywhere else.