cxBufferFree() now calls cxBufferDestroy()

Tue, 26 Nov 2024 21:53:06 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 26 Nov 2024 21:53:06 +0100
changeset 991
ec49db06dae0
parent 990
f708863e7ec6
child 992
14ca894190fd

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);
 }
 

mercurial