On Mar 19, 2012 5:56 AM, "Basile Starynkevitch" wrote:
>
> On Sun, 18 Mar 2012 20:49:24 +0000
> Jonathan Wakely <jwakely....@gmail.com> wrote:
>
> > On 18 March 2012 16:56, Basile Starynkevitch wrote:
> > >
> > >   * a garbage collector. Even a modular GCC need some memory management 
> > > policy (and
> > > ref-counting à la GTK, or à la std::shared_ptr is not enough IMHO inside 
> > > a compiler
> > > because a compiler has much more complex and circular data structures, 
> > > and much less
> > > hierarchically organized, that a graphical tookit has).
> >
> > As has been pointed out to you before, shared_ptr is designed to be
> > useful even with circular structures. Please read about weak_ptr.
>
>
> Then why has it not being used before?

I don't understand the question.  Are you asking why shared_ptr hasn't
been used in GCC before?  Surely that's obvious, the GCC code is still
written in C and no C++ templates have been introduced to the code
yet.

Maybe shared_ptr isn't the right tool for memory management in GCC,
but if it's rejected then I hope it will be for valid reasons, not
because of misinformation about being unsuitable for code with
circular references.

Reply via email to