Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
augustk
on Feb 20, 2023
|
parent
|
context
|
favorite
| on:
Lesser known tricks, quirks and features of C
It's even easier if you use a garbage collector, like for instance libgc. Then you just replace
(ptr) = malloc((n) * sizeof (ptr)[0]);
with
(ptr) = GC_MALLOC((n) * sizeof (ptr)[0]);
in the macro and don't have to worry about calling
free
.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: