On Wed, 2004-04-28 at 10:57, Allen Bierbaum wrote:
> >
> That definitely helps.
> 
> Thanks for the pointers to RefPtr and makeCoredNode as well.  They will 
> be a great help for me.  I don't think I ran across those in the 
> documentation. 

Probably not. I've written them some time ago, as they are pretty
trivial, but I haven't gotten around to thoroughly test them and change
the tutorials to use them.
 
> I will look again though as I would like to understand 
> RefPtr much better to make sure I use it correctly.

It's a simple straight smart ptr. On assigning a value to it increases
the new object's refcount and decreases the current object's refcount.
Of course, only if they're not NullFC. It gives you a cast operator to
the stored pointer type, and the usual -> operator. And that's about it.

The actual work is done by the existing refcount mechanism, which
deletes objects whose refcount goes to or below 0. 

The code is really trivial, but you're welcome to take a look and tell
me if there's a loophole for undefined behavior that I missed.

Yours

        Dirk




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to