I'd like to add that, as far as a GC is concerned, local variables in
memory versus in registers are no different. Further, one need not actually
null them out. If you have done a static analysis of variable liveness, you
can use those results to treat dead registers/locals AS IF they are
null. (I was co-author on a paper that actually did that; it makes a
difference for some programs.)
The situation with fields of heap objects and static fields is rather
different, of course.
Regards -- Eliot
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:01:05 EDT