edits
[iotcloud.git] / version2 / src / C / ByteBuffer.h
index 7b8d2e4ed9c71295af4e6761aaedd7cdc6d7e039..06c309bf885a088ff0521f4da6754f0e4f36b86d 100644 (file)
@@ -13,8 +13,11 @@ public:
        char get();
        void get(Array<char> *array);
        void position(int32_t newPosition);
+       void releaseArray() {buffer = NULL;}
        Array<char> *array();
-private:
+       ~ByteBuffer() {if (buffer != NULL) delete buffer;}
+       
+ private:
        ByteBuffer(Array<char> *array);
        friend ByteBuffer *ByteBuffer_wrap(Array<char> *array);
        friend ByteBuffer *ByteBuffer_allocate(uint size);