robertosfield wrote: > Hi Sebastian, > > Using ref_ptr<> in local scope to objects t that are owned by external > scope is a good practice but isn't always required. > > If your application is multi-threaded then the external scope could > unref and objects that you are using, so if you don't have your own > reference to it it would go out of scope and you'd end up with a > dangling pointer in your local scope. > > If your application is single threaded then it should be safe to just > use C pointers in local scope while the object is kept alive by the > external scope. > > Robert. >
Thanks. I would like to stick to multi threading. Even if it doesnt make sense in local scope i have a consitent way of using ref_ptr everytime. ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=70515#70515 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org