src/buffer.c

changeset 991
ec49db06dae0
parent 989
8aa57a7fecc4
child 1004
d8044fd5005c
equal deleted inserted replaced
990:f708863e7ec6 991:ec49db06dae0
90 } 90 }
91 } 91 }
92 92
93 void cxBufferFree(CxBuffer *buffer) { 93 void cxBufferFree(CxBuffer *buffer) {
94 if (buffer == NULL) return; 94 if (buffer == NULL) return;
95 if ((buffer->flags & CX_BUFFER_FREE_CONTENTS) == CX_BUFFER_FREE_CONTENTS) { 95 cxBufferDestroy(buffer);
96 cxFree(buffer->allocator, buffer->bytes);
97 }
98 cxFree(buffer->allocator, buffer); 96 cxFree(buffer->allocator, buffer);
99 } 97 }
100 98
101 int cxBufferSeek( 99 int cxBufferSeek(
102 CxBuffer *buffer, 100 CxBuffer *buffer,

mercurial