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, |