Re: [PATCH] graph: avoid id collisions

2024-03-26 Thread Jerin Jacob
On Mon, Mar 25, 2024 at 9:24 PM Robin Jarry wrote: > > The graph id is determined based on a global variable that is > incremented every time a graph is created, and decremented every time > a graph is destroyed. This only works if graphs are destroyed in the > reverse order in which they have bee

[PATCH] graph: avoid id collisions

2024-03-25 Thread Robin Jarry
The graph id is determined based on a global variable that is incremented every time a graph is created, and decremented every time a graph is destroyed. This only works if graphs are destroyed in the reverse order in which they have been created. The following code produces duplicate graph IDs wh