On Wed, Jul 24, 2024 at 04:46:20AM -0700, Karthik Nayak wrote: > Patrick Steinhardt <ps@xxxxxx> writes: > > > We semi-regularly have discussions around whether a function shall be > > named `release()` or `free()`. For most of the part we use these two > > terminologies quite consistently though: > > > > I noticed there is also `clear()` used in some places. Should we also > mention that we don't recommend using `clear()` WRT freeing memory? In any case I think we should decide on eithe using `clear()` or using `release()` for consistency's sake. Which of both we use I don't quite care, but the following very shoddy analysis clearly favors `release()`: $ git grep '_clear(' | wc -l 844 $ git grep '_release(' | wc -l 2126 So yeah, I'm happy to explicitly mention that `clear()` shouldn't be used in favor of `release()`. Patrick
Attachment:
signature.asc
Description: PGP signature