|
|
|||||||
Quote: I am not sure I understand you question 100% correctly. If you are asking whether interned Strings are scoped to a JVM-global or class-scoped pool then the answer is obviously that the pool cannot be scoped to individual classes, because several loaded classes interning the same String value will end up (as required by the VM spec) sharing the same interned String instance. If you are asking whether the intern pool must be implemented natively or in bytecode, then I don't believe the VM spec goes to this level of detail. It is possible to verify that recent JVMs don't even use the Java heap memory for interned Strings. That is, all interned Strings go into an internal native data area. |