Re: [PATCH 2/2] Free multidicts from blockvector

Tom Tromey
2025-10-23T18:52:46Z

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

>> + for (struct block *bl : m_blocks)
>> + mdict_free (bl->multidict ());
>> +}

Simon> Ideally it would be struct block's just to call that. You could add a
Simon> destructor to struct block and call it explicitly here. It would be the
Simon> same result, but would be more correct encapsulation-wise. But I guess
Simon> this is fine too for the time being.

Yeah. I have kind of an aversion to explicit destructor calls.
Though maybe not for any good reason.

Simon> Since there is a user-defined destructor, I would add a
Simon> DISABLE_COPY_AND_ASSIGN. Otherwise, LGTM.

I did this.

Tom