Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [DataBinding] DataBindingContext doesn't call dispose on used IObservables
[DataBinding] DataBindingContext doesn't call dispose on used IObservables [message #337048] Fri, 24 July 2009 01:36 Go to next message
Ashley Cambrell is currently offline Ashley CambrellFriend
Messages: 5
Registered: July 2009
Junior Member
Hi All,

I'd thought I'd ask first before filing a bug report.

I sometimes add ListChangeListener to the DataBindingContext#getBindings()
to track bindings being added and removed, so I can add generic behaviour
to them with out manually adding the listeners to each binding. However,
cleaning up is a hassel as I can't detect when the DataBindingContext gets
disposed. The DataBindingContext itself doesn't have a addDisposeListener
method and the underlying IObservableList that it uses are not disposed
when DataBindingContext#dispose is called. (dispose is called on each Bind
held in the IObservableList, but not on the IObservableList itself).

Would it be possible to modify DataBindingContext#dipose() so that it
called dispose on the IObservables it used?

bindings.dispose()
unmodifiableBindings.dispose() //(Calling dipose on a wrapping collection
doesn't call dispose on the wrappee)
validationStatusProviders.dispose()
unmodifiableStatusProviders.dispose()
validationStatusMap.dispose()

Is there another way to do it?

Cheers,

Ashley Cambrell
Re: [DataBinding] DataBindingContext doesn't call dispose on used IObservables [message #337073 is a reply to message #337048] Sun, 26 July 2009 15:52 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

No because you can in theory share observables between databinding
contexts. In 3.5 a new class named ObservableTracker was added but
because we discovered a late bug it's not useable until 3.5.1.

Tom

Ashley Cambrell schrieb:
> Hi All,
>
> I'd thought I'd ask first before filing a bug report.
>
> I sometimes add ListChangeListener to the
> DataBindingContext#getBindings() to track bindings being added and
> removed, so I can add generic behaviour to them with out manually adding
> the listeners to each binding. However, cleaning up is a hassel as I
> can't detect when the DataBindingContext gets disposed. The
> DataBindingContext itself doesn't have a addDisposeListener method and
> the underlying IObservableList that it uses are not disposed when
> DataBindingContext#dispose is called. (dispose is called on each Bind
> held in the IObservableList, but not on the IObservableList itself).
>
> Would it be possible to modify DataBindingContext#dipose() so that it
> called dispose on the IObservables it used?
>
> bindings.dispose()
> unmodifiableBindings.dispose() //(Calling dipose on a wrapping
> collection doesn't call dispose on the wrappee)
> validationStatusProviders.dispose()
> unmodifiableStatusProviders.dispose()
> validationStatusMap.dispose()
>
> Is there another way to do it?
>
> Cheers,
>
> Ashley Cambrell
>
Previous Topic:Workbench layed out incompletely after restoring a view
Next Topic:Eclipse Modeling 64bit for Mac
Goto Forum:
  


Current Time: Mon Sep 23 12:42:55 GMT 2024

Powered by FUDForum. Page generated in 0.03467 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top