"kabir.khan(a)jboss.com" wrote : "flavia.rainone(a)jboss.com" wrote :
| | *** I mean, when you do toClass, the class is already in the cache by now. Plus,
what if somebody is doing a toClass with a class that is in the softcache? The lockInCache
call will force the class being added as a hard reference to the "classes"
cache, thus ruining the soften feature.
|
| I'm not really sure what you mean here, but toClass() is called when creating a
new class so does that not need to be in the hard cache? If only in the softcache, when it
is removed and somebody needs to obtain the CtClass again we would need to load it from
its resource. Although in AS that would probably be fine since dynamically created classes
have their bytes written to a temporary location (tempURL in AS 4, vfsmemory url in AS 5)
The lockInCache method forces the class to be added to the classes cache, which is hard
reference based. But, if you add a class that was in the softcache to the classes cache,
the softcache is useless for this class... it is in the softcache but it won't be
gc'ed.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241205#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...