[Top][All Lists]

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

Re: [Gnash-dev] dangers of intrusive_ptr misuse

From: strk
Subject: Re: [Gnash-dev] dangers of intrusive_ptr misuse
Date: Mon, 5 Feb 2007 11:10:18 +0100

On Fri, Feb 02, 2007 at 08:15:04PM +0000, Martin Guy wrote:
> >The attached testcase contains a "forbid-deletion" mechanism making 
> >debugging
> >easier. We might want to add this to gnash as well when facing similar 
> >problems
> If possible we should keep the code complexity down rather than
> introducing more high-powered custom mechanisms, otherwise it'll be
> hard ever to shake the bugs out of it, and it'll leave traps for
> future programmers who may now know exactly which dance they have to
> perform to allocate and free objects safely... even if that means
> using some standard GC.

I agree custom mechanisms would make things more complex, but "standard" ones
would make them cleaner. In this case, the "standard" mechanism would be
adopting the RAII idiom 
thus making sure that pointers are never passed around as raw ones.


reply via email to

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