logoalt Hacker News

unwind12/09/20251 replyview on HN

Where would you put it? The const of the pointer is not the main point, it's just extra clarity that the allocated pointer is not as easily overwritten which would leak the memory.


Replies

f1shy12/10/2025

I put it attached to the variable name when possible, if not attached to the type.