openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Mark receiver objects of an instance method

Open babsingh opened this issue 1 year ago • 0 comments

Marking the receiver object of an instance method ensures that it is not collected by the garbage collector (GC) while the instance method is executing.

If the receiver object is not marked, there is a risk that the GC might collect it. In such cases, finalization mechanisms, such as PhantomReferences and Cleaners, could indicate that the object has been collected while it is still in use. This issue is resolved if the receiver object is marked during the execution of its instance method.

Fixes: https://github.com/ibmruntimes/Semeru-Runtimes/issues/93

babsingh avatar Oct 18 '24 15:10 babsingh