Re:Show HN: C library of generic, reference-counted data str...
by cmccabe on Monday June 17, 2013 @03:46PM
(#5895450)
Thanks, that's interesting. I would probably add some kind of callback to free individual elements if I ended up using this. A lot of the boilerplate when managing resizable arrays in C ends up being making sure you properly dispose of elements. Or at least it was for me when I last did this.
[ Parent
| on HN ]
Re:Show HN: C library of generic, reference-counted data str...
by wrl on Sunday June 23, 2013 @05:17AM
(#5926793)
Absolutely, but that's something I feel that could be implemented on top of these macros if necessary.
Currently I'm using this code just for a string buffers and other arrays where the individual elements are stored in-place in the array.