You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/09/06 21:27:13 UTC

[GitHub] matthiasblaesing opened a new pull request #848: [NETBEANS-406] Fix a potential memory leak involving DocumentUtilitie…

matthiasblaesing opened a new pull request #848: [NETBEANS-406] Fix a potential memory leak involving DocumentUtilitie…
URL: https://github.com/apache/incubator-netbeans/pull/848
 
 
   …s.addPropertyChangeListener.
   
   WeakListeners.propertyChange(lister, source) expected, that it can
   detach from the supplied source by invoking removePropertyChangeListener
   on it. This contract is violated in this construct:
   
   DocumentUtilities.addPropertyChangeListener(doc, WeakListeners.propertyChange(this, doc));
   
   DocumentUtilities does not attach the PropertyChangeListener to the
   document, but to a PropertyChangeLister contained in it. The Document
   itself does not support removePropertyChangeListener.
   
   The solution is to add a new api method addWeakPropertyChangeListener,
   that hides the complexity from the user.
   
   The issue was raised and diagnosed by Eirik Bakke.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists