texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] [PATCH] solves GCC 3.2 auto_save segfault for me...


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] [PATCH] solves GCC 3.2 auto_save segfault for me...
Date: Mon, 4 Nov 2002 20:33:29 +0100 (MET)

Hi Igor,

> Comments?

Thanks a lot for your patch.
This g++-3.2 was really causing me headaches,
so this is a very valuable contribution.

> -  inline ~concrete_struct () { DEBUG(concrete_count--); }
> +  inline virtual ~concrete_struct () { DEBUG(concrete_count--); }

Shouldn't I do this for abstract_struct as well?

> +//void destroy_tree_rep (tree_rep* rep);
>   inline tree::tree (const tree& x): rep (x.rep) { rep->ref_count++; }
> -inline tree::~tree () {
> -  if ((--rep->ref_count)==0) destroy_tree_rep (rep); }
> +
> +inline tree::~tree ()
> +{
> +    if ((--rep->ref_count)==0) {
> +        //destroy_tree_rep (rep);
> +        delete rep;
> +        rep = NULL;
> +    }
> +}

I am a bit confused by this. Is this necessary?
We should recursively delete the tree,
so it does not suffice to just delete the pointer...





reply via email to

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