Project: Eclipse_Platform_UI
Bug 255734 [DataBinding] DecoratingObservable should self-dispose when the decorated observable is disposed
Reported: 2008-11-18 18:03:40 | Status: resolved fixed

DecoratingObservable should dispose itself in response to the disposal of its decorated observable. One thing we'll have to address is that all existing observables may call firstListenerAdded() / lastListenerRemoved() in response to an addDisposeListener() / removeDisposeListener() call. We should try to eliminate this case to avoid hooking listeners when all we're interested in is disposal.

Files changed in fix:
bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ChangeManager.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/DecoratingObservable.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/ChangeManager.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/DecoratingObservable.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/AbstractObservableTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/ChangeSupportTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/DecoratingObservableTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.java