-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi Robert,
On 6/03/2014 12:48, Robert Osfield wrote: > Hi Ulrich, > > If you get a C pointer from a ref_ptr<> you are explicitly moving outside the > scope > of automatic reference counting. It's only safe to get and use a C pointer > from a > ref_ptr<> if you know the object being referenced will not get unreferenced > during > the lifetime of the C pointer. If you don't feel comfortable with this > responsibility then simply don't get a C pointer, just pass around > ref_ptr<>'s, the > availability of get() method is to allow power users to use the speed and > flexibility > of the C pointer when they know it's safe. Yes, that was my understanding too. I was just advocating this procedure since it's sort of most-common practice in OSG to return raw pointers and the question came up. Thanks, /ulrich - -- Fingerprint 0227 8EE1 2C64 8EF4 DA11 9864 FF16 0114 B9DA 3318 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCAAGBQJTGiILAAoJEP8WARS52jMYSHQH/RTfB/So+bUHblOEnpC8UUqU G8EYyOzPejeo7kDAGN8fPegSVYQLrkkZGSIGOjOnivl7PSUH92UChzvMGSf8s8XX gG29Sa0vSiWPaTn6O7+6dSu16x2PxYlXSPcWIvk1pTJSFMpNofVS/xAQuqaUqzaw 8iTs9a49mkm69PNH5JzmzSDzeXDvxYwLJ4AdlO+YkSJDI3lych3cb8Qhx75cMyWW pkQpa8pXTQXgBgFE3njfWQFaUDyzjkj2Ms3lkNgJtuXfyTa7zKU2fNDM3RyZ5JXr q6txWStp+gnqUwdw6nGCY6D2t/2SoiVUVXWgJgK9uql8uEJ3v5kbJoGSzKqe9ME= =AgNn -----END PGP SIGNATURE----- _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org