[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] GC and refcount

From: Richard Wilbur
Subject: Re: [Gnash-dev] GC and refcount
Date: Tue, 22 Dec 2009 23:13:05 -0700

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.

PGP public key at

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]