Really BIG -1 from me. As Aleksey (Ignatenko) described in original thread, j/l/Class'es and j/l/ClassLoader's are always available in rootset, so even if no objects of a class exist, this class will be reachable.
Actually, some sort of class unloading prototype exists in DRLVM code, which implements the scheme, which is very close to what is currently voted. It was integrated with GC v4 and is not supported by other GCs. This prototype traces up to class loader. Robin's approach is way faster then prorotype is. Unfortunately, that approach requires up to 3 GC cycles to complete in DRLVM. BTW, voted approach does not describe "proof-of-full-collection" algorithm (at least I didn't find one). The only one I think of is full-heap-collection, which _requires_ STW. Although "automatic anloading" brings some additional requirements for GC (weak roots (references) support and pinned allocation), it is proven to work (patch available) and, also, is the most natural algorithm for DRLVM. With the best regards, -- Pavel Pervov, Intel Enterprise Solutions Software Division