matthiasblaesing commented on PR #7451:
URL: https://github.com/apache/netbeans/pull/7451#issuecomment-2158867058

   > Is there any benefit to keeping the delegate in a weak reference now 
there's a 1-to-1 mapping of context action to performer? Having any GC 
dependent code requires thought and care, and if we can get rid of it now and 
not have GC affected behaviour, then all the better.
   
   Consider a normal `ContextAwareAction`, this means a `ContextAwareAction` 
without state. In that case the IDE can spin up a huge number of 
`ContextAction`/`Performer` combinations. The `instDelegate` is only created 
when the action is actually being invoked. If that action now is "big" (for 
example because their target is huge), having it in a `WeakReference` allows it 
to be removed. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to