Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Glanced over it, it doesn't look like a bug, just wasteful.

The way I see it, because sc_array_clear resets cap and size to zero, the next call to sc_array_add will issue a realloc call to the default minimum size (8) and it won't leak because sc_array_clear doesn't overwrite elems.

So yeah, not cool but doesn't look like a bug either.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: