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.
There is static HashMap file2Holder in org.netbeans.modules.editor.hints.AnnotationHolder class. It uses DataObject as key and AnotationHolder instance as value. Please investigate if data in this static Map are properly released and that there is no memory leak. You can use heap dump from issue #250638 to see suspicious content of file2Holder Map.
The map items are released as soon as a CloneableEditor attached to the dataobject closes/is removed from the EditorRegistry. Size of the map (= 42) << # of GsfDocument( = 169), so at least some AnnotationHolders are released as expected. The static Map could be eventually turned to WeakMap keeping AnnoHolders with WeakReference -- the holder attaches itself as [hard] listener to the underlying Document during construction, so it will be kept as long as the Document and DO lives, but it's not necessary IMHO given the cleanup sequence.