Can `BindingOperations.EnableCollectionSynchronization` cause memory leaks?

44 views Asked by At

I'm debugging a potential memory leak in a presentation model class used with WPF. It calls the BindingOperations.EnableCollectionSynchronization static method with an ObservableCollection property, which informs the WPF binding engine to use the given synchronization lock object when access the collection via data binding.

No where does this class call the BindingOperations.DisableCollectionSynchronization. Could this result in the associated collection being marked and preserved during garbage collection, even once the presentation model is finished with? Is it good practice to call BindingOperations.DisableCollectionSynchronization when a collection is finished with?

0

There are 0 answers