i have implemented a TableModel whose registers launch PropertyChangeEvents. My TableModel listen those events to fire TableModelEvents in order to refresh the underliying JTable.
If the TableModel is cleared or refreshed with new registers... has the TableModel to call the "removePropertyChangeListener" method in each register in order to allow the GC to collect those registers?
supose that there isn't another live reference to those registers.
No. The register object has a reference to your table model (through the listener). So if the register is not reachable any more, it will be garbage collected.
On the other hand, if you keep the registers alive, but change the table model without removing it as listener from the registers, then the registers will maintain a reference to the old model, and the model won't be garbage collected.
It's usually a good idea to have long-lived objects listen to changes in short-lived objects. If it's the other way, then forgetting to remove listeners leads to memory problems (unless weak references are used for maintaining the list of listeners)