Tue, 26 Nov 2024 21:53:06 +0100
cxBufferFree() now calls cxBufferDestroy()
src/buffer.c | file | annotate | diff | comparison | revisions |
--- a/src/buffer.c Sat Nov 23 15:15:09 2024 +0100 +++ b/src/buffer.c Tue Nov 26 21:53:06 2024 +0100 @@ -92,9 +92,7 @@ void cxBufferFree(CxBuffer *buffer) { if (buffer == NULL) return; - if ((buffer->flags & CX_BUFFER_FREE_CONTENTS) == CX_BUFFER_FREE_CONTENTS) { - cxFree(buffer->allocator, buffer->bytes); - } + cxBufferDestroy(buffer); cxFree(buffer->allocator, buffer); }