Hi all,
I'm making some function to modify graph after some operation, and so I need
to call some simple actions in functions.
The problem is about ref_ptr :
I need to do this :
osg::ref_ptrosg::Group mygroup;
[..]
mygroup = NULL;
[...]
To do that in a function, I use someting like :
Hi Vincent,
I don't know if anyone else can make sense of what you are trying to
do, based on your email, but I'm just lost. I kinda doubt the problem
is really about ref_ptr, but something related to the overall code
that you have written, but since I can't really spot what you intend
or what
Hi Vincent,
Vincent Bourdier schrieb:
Hi all,
I'm making some function to modify graph after some operation, and so I
need to call some simple actions in functions.
The problem is about ref_ptr :
I need to do this :
osg::ref_ptrosg::Group mygroup;
[..]
mygroup = NULL;
Vincent Bourdier wrote:
Hi Robert
I've a ref_ptr to put to NULL, but I can't do a simple my_refptr = NULL;
I need to set it in a function.
In argument of my function, I get a ref_ptr, and in the function, I
put this ref_ptr to NULL;
I do not return anything.
Perhaps ref_ptr::release()?
Hi
I'm not sure to understand what release() do...
T* release() { T* tmp=_ptr; if (_ptr) _ptr-unref_nodelete(); _ptr=0;
return tmp; }
what does unref_nodelete() do ?
what does it return really ?
Thanks
Vincent.
2008/5/23 Paul Melis [EMAIL PROTECTED]:
Vincent Bourdier wrote:
Hi Robert
Vincent Bourdier a écrit :
In argument of my function, I get a ref_ptr, and in the function, I
put this ref_ptr to NULL;
but at the end (going out of the function), my original ref_ptr hasn't
been modified...
Do you pass your ref_ptr by value or by reference ?
Here is an example :
Thanks for all, I'll try with reference and not by copy (I didn't think
about that)
Thanks
Regards,
Vincent.
2008/5/23 Paul Melis [EMAIL PROTECTED]:
Are you sure you understand the basic concept that ref_ptr together with
osg::Referenced implements?
You might want to read
7 matches
Mail list logo