question regarding call sites and garbage collection

Jochen Theodorou blackdrag at gmx.org
Tue Mar 15 00:58:30 PDT 2011


Hi all,

assuming I have a method call x.foo(a,b), where x is of class X, a of 
class A and b of class B. And let us assume I will create a MethodHandle 
MH: X#foo(A,B). Is it now the case, that unless I don't keep a hard 
reference to MH anymore, that X, A and B cannot be garbage collected?

If I create a call site using/returning MH, won't it be naturally the 
case that I hard reference the handle? If the callsite is inlined, won't 
that mean that then we have those types hard referenced as well and that 
I cannot do anything against that?

bye Jochen

-- 
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead
http://blackdragsview.blogspot.com/
For Groovy programming sources visit http://groovy.codehaus.org



More information about the mlvm-dev mailing list