This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[dev build 200210240100] SerialDataConvertor.isModuleEnabled creates WeakListener with reference to ModuleInfo object (as source), but ModuleInfoManager.registerPropertyChangeListener adds the listener to something else (ModuleInfoManager.PCL). As result, the WeakListener cannot be automatically removed when the listener is freed. This causes one more WeakListener added permanently each time a file is opened (issue 27563). Allocation stack trace attached.
Created attachment 7772 [details] allocation backtrace of the WeakListener
Sorry, bad stacktrace attached, correcting...
Created attachment 7774 [details] the right stacktrace
Jan's code. I suspect MIM.PCL.addPCL should be changed from changeSupport = new PropertyChangeSupport(this); to changeSupport = new PropertyChangeSupport(MIM.this); But I think that would not work either because the MIM public methods are not named according to the conventional names.
You are right. It would not work. I am going to look at it.
Fixed together with issue #16009. A proper source object is passed to WeakListener.
closed