2 ms·
Using realloc would be better, since it allows the memory allocator the option of not copying the string.
by cperciva 16y ago
Using realloc would be better, since it allows the memory allocator the option of not copying the string.
- js2 16y agoIndeed. I wasn't sure you could realloc to a smaller block. Good to know.