question regarding call sites and garbage collection

Charles Oliver Nutter headius at headius.com
Wed Mar 16 12:06:39 PDT 2011


On Wed, Mar 16, 2011 at 3:36 AM, Jochen Theodorou <blackdrag at gmx.org> wrote:
> The result, should I have understood correctly, will be, that each
> scriptn will cause the former scriptn (lastScript) to be referenced in a
> way that prefents that from being garbage collected, even though scriptn
> does not reference lastScript directly and there will be no reference to
> the class loader as well. So in theory the last script could be garbage
> collected but the MethodHandles prevent that from happening.

You understand correctly. But presumably your existing call site
caching has this same side effect, yes? Or is your call site cache
weak referenced?

- Charlie


More information about the mlvm-dev mailing list