On Tue, 9 Jun 2026 00:43:58 GMT, Chris Plummer <[email protected]> wrote:

> (1) The most obvious is that the JDI user should already be calling 
> ObjectReference.disableCollection() as soon as the object is returned, and 
> then call enableCollection() when done. The enableCollection() will see the 
> gcDisableCount go to 0, and call ObjectReference.EnableCollection, which will 
> result in the object being unpinned. So in the normal use case the life of 
> the pin is not being extended beyond any current pinning.

This is a good observation, I wonder if Egor or other IDE maintainers could 
confirm they do this. If the IDEs are already doing this then it significantly 
reduces the concerns that the approach would lead to indefinite pinning in a 
long running debugger session.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/31421#issuecomment-4671251610

Reply via email to