Attila Szegedi wrote: > Those end up being two separate classes then -- you'd get a > ClassCastException if you tried to cast an instance of one into the other. > Class identity is always class loader scoped, so you still get one > guaranteed <clinit> per class, 'cause as far as JVM is concerned, loading > the same bytecode in two class loaders results in two different classes.
Fine by me :) I don't want them to be the same anyway. They'll all implement the same interface from a higher classloader, so problem solved. > This actually sounds like it'd make sense to add a new class annotation in > next Java release, i.e. @Disposable. JVM would not create strong > references from the class with this annotation to the class loader. (It > might actually want to create a soft reference, though, to minimize the > number of reloads.) > > I'm not sure whether this'd could actually fly -- I myself don't see why > not, but maybe some JVM folks with more insight on this list could tell us > if there'd be some dire consequence to having this feature? I remember either John Rose or Kenneth Russell claiming it ought to be possible, but I don't know if it went any further than that... - Charlie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
