On Fri, Aug 24, 2007 at 01:38:19PM +0900, Chad Musick wrote: > We use the intrusive_ptr throughout Gnash, but I don't see how it > functions properly. The webpages I've read about it say that it needs > some reference counting helper functions defined for each template > instance, and I don't see any of these. My boost book hasn't arrived > yet (apparently isn't yet in print), so perhaps I'm misunderstanding. > > Can someone point me to a good tutorial on how these work?
http://www.boost.org/libs/smart_ptr/intrusive_ptr.html Ref-counting helper functions defined in libbase/smart_ptr.h, they are intrusive_ptr_add_ref and intrusive_ptr_release. We have two versions of those methods, one for GcResources and one for ref_counted. This was an hack to allow an easy switch between RC and GC models (ie: keep all pointers in the same intrusive_ptr wrapper). As you can see, the version for GcResource does nothing. The version for ref_counted calls the appropriate refcount menagement functions. --strk; _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

