[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[e4-dev] How should clients be expected to dispose of IEclipseContext instances?
|
I am currently working on a headless "context rendering" engine and thought I would implement IPresentationEngine's removeGui(MUIElement) method by nulling out the context and disposing of it.
So I looked in IEclipseContext and didn't spot any dispose() methods but saw it in EclipseContext so I thought "oh, maybe I just missed it". However, when I tried to use code completion back in my IPE implementation, I realized that my initial scan was correct and that dispose() is not defined as a method in IEC. I then realized that I found a dispose() method in EclipseContext because it implements IDisposable.
Should clients even expect there to be some sort of a life cycle for IECs? If yes, how would they clean things up when they're done? Are they even expected to do clean-up themselves? Should IEC extend IDisposable or are clients supposed to do an instanceof check and throw in a cast where possible?
Regards,
Remy
----------
Remy Suen
Eclipse Platform/UI Committer, Rational Team Concert Developer
IBM Ottawa
613-356-5162