I’ve got a system working where certain data objects are ChangeBroadcasters to notify control elements of their changes. When an element that uses it is created, it is registered with the data by adding itself as a ChangeListener.
I thought i’d be able to have the object check if it had any registered elements (is there a reason why there is no ‘getNumberOfChangeListeners()’ function?).
My main issue at the moment is that the elements automatically remove themselves as listeners from the data (as per my above assumption), but i get assertions at program close because they’re not registered (my guess because the data object has already been deleted? but then how is such a function getting called?) Is this going to be a problem for me? Continuing thru the assertions, there are no memory leaks or errors in the output.