On Tue, 2009-12-22 at 20:31 +0100, strk wrote:
> A posible solution to this problem is having 
>  intrusive_ptr_add_ref(const ref_counted* o)
> and
>  intrusive_ptr_release(const ref_counted* o)
> 
> NEVER dereference 'o' but rather ask the GC
> to manage the reference count. The GC might
> keep a map of managed resources and do
> nothing if they are no more in the list.
> 
> Only thing to take care of in this case would
> be ensuring that the objects-to-be-deleted won't
> be really deleted (freed) until the intrusive_ptr
> they contain are reset, which means adding a method
> to every objects who may contain references to
> GcResources to use for 'clearing' all those references
> before destruction.
> 
> --strk;
[...]

This sounds like a good solution to a rather knotty (or should I say
loopy?) problem.

Richard
-- 
PGP public key at
http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0xA7CEB3C711AFF0B0

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to