Hi Sajjad,
Sajjadul Islam wrote:
> Hello,
>
> The automatic garbage cleaner in OpenSG seems to be a very useful tool.
> And it has been described in the tutorial without a practical example
> and thats why probably it is not clear to me.
>
> I have attached a working version of a code of the planetary system
> without the use RefPtr<> and i want to use that concept, but not sure
> how to use that concept.
>
> I hope someone with give me more detail on that issue.
I haven't time to look at the code, but you can find a lot of
information on this area under the keyword 'smart pointers' or in the
boost::shared_ptr library.
The basic idea is that the RefPtr will call addRef and subRef
automatically whenever a value is assigned to it, so you never have to
call it yourself as long as all your variables are RefPtrs.
Hope it helps
Dirk
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users