bison-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] cex: fix leaks


From: Akim Demaille
Subject: Re: [PATCH] cex: fix leaks
Date: Tue, 19 May 2020 07:18:26 +0200

Hi Vincent,

> Le 18 mai 2020 à 23:09, Vincent Imbimbo <address@hidden> a écrit :
> 
> Hey Akim,
> 
> I realized this afternoon that it would probably be fine to put all of these 
> edges in the state-items themselves:
> 
> struct state_item
> {
>     ...
>     struct state_item *transition;
>     bitset productions;
>     bitset revs;
> };

That sounds much clearer!

> I think the derivation leaks are going to take a little bit more thought. I
> probably need API in gl_list to free the list without calling its dispose
> function on elements. I guess I could also just set it to NULL and free
> everything manually instead.

Or maybe you can steal the elements from the list before?  And set NULL in the
list instead.  I don't know you use case, so it might not be applicable.

Cheers!


reply via email to

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