2013/9/5 Roland Hill roland.h...@fourwindstechnology.com.au
Yes. To use osg::ref_ptr the object has to be derived from osg::Object.
That's where the reference count code is.
Roland
It has to be derived from osg::Referenced.
___
osg-users
On Wed, Sep 4, 2013 at 5:47 PM, Roland Hill
roland.h...@fourwindstechnology.com.au wrote:
In point 7, while you pass a raw Camera* to viewer.addSlave, you will
probably find that it then stores that pointer in a
osg::ref_ptrosg::Camera, which then increments the reference count.
Therefore the
On Thu, Sep 5, 2013 at 6:26 AM, Chris Stankevitz
chrisstankev...@gmail.com wrote:
Thank you. I did not expect that behavior, although I knew I was
wrong about something. There must be some interesting plumbing that
allows
I see now. osg::ref_ptr is more like an intrusive_ptr than a
Hi Chris,
On Wed, Sep 4, 2013 at 5:47 PM, Roland Hill
roland.h...@fourwindstechnology.com.au wrote:
In point 7, while you pass a raw Camera* to viewer.addSlave, you will
probably find that it then stores that pointer in a
osg::ref_ptrosg::Camera, which then increments the reference count.
Chris,
Yes. To use osg::ref_ptr the object has to be derived from
osg::Object. That's where the reference count code is.
Roland
--
ROLAND HILL
Director
Four Winds
Hello,
Can you please correct any wrong statements:
1. osg::ref_ptr increments the reference count when it is constructed
with a pointer.
2. osg::ref_ptr decrements the reference count when it is destroyed
3. osg::ref_ptr::get returns a raw pointer and does not increase the
reference count
4.
Hi Chris,
In point 7, while you pass a raw Camera* to viewer.addSlave, you
will probably find that it then stores that pointer in a
osg::ref_ptrosg::Camera, which then increments the
reference count. Therefore the reference count is decremented to 1
7 matches
Mail list logo