HI,all
When writing a osgDB::ReadFileCallback, We
need know if there was someobject existed in the Registry's object
cache on sometime.
Usualy, We call
osgDB::Registry::instance()->getFromObjectCache to do this.
Example:
osg::Object * obj =
osgDB::Registry::instance()->getFromObjectCache ();
if(obj)
{
doSomething();
}
else
{
doOtherthing();
}
When using this in multithread environment , it
is not thread safe: obj maybe be deleted before getFromObjectCache
return.
So , Do We need add a function
osg::ref<Ojbect> getRefFromObjectCache(const std::string& fileName )
for osgDB::Registry?
Thank you!
Cheers,
lilinx
---------------------------------------
卡巴斯基,价值非凡的安全保护
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org