On Thu, 2006-12-21 at 11:43 +0000, Robert Lougher wrote: > JamVM therefore records a class as having a finalizer only if it has > overridden the one in java.lang.Object. The assumption is that it > will only provide it's own finalizer if it actually has something to > do, so the code currently doesn't check if it is empty or not. I will > add this check. I hope the optimization is actually worth it. It occurred to me that enums are of course by design singletons. So in that case you might not actually find so many instances of them anyway. If someone implements this 'empty-finalizer-erasure' it might be interesting to have a statistic of how many empty finalizers there actually are in the wild (say by running some bigger programs like eclipse or tomcat to see whether or not it actually occurs for real users, or only is an issue in case of contrived benchmarks). Cheers, Mark
Attachment:
signature.asc
Description: This is a digitally signed message part