Craig L Russell schrieb:
Hi Erik,

The JDOImplHelper cannot use soft references to registered classes because it wasn't clear what would happen if the class is garbage collected and then used again. We wanted to make sure that the JDOImplHelper would always have the metadata for the class.
When a class object is garbage collected, doesn't that simply mean that it needs to be loaded again and initialized the same way it was for the first time?

There can't be any instances of that class anymore, so if anyone wants to do anything with a garbage collected class, he needs to load (and initialize) it first, registering the new class object with JDOImplHelper.

To me it seems that there would be no problem with SoftReferences or even WeakReferences here.

Reply via email to