Hacker News new | past | comments | ask | show | jobs | submit login

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: