| Index: runtime/bin/io_buffer.h
|
| diff --git a/runtime/bin/io_buffer.h b/runtime/bin/io_buffer.h
|
| index c9a72877e0c74b054e3a97db163555c589410cad..69a5c09b2b6240e5bd46953a66c9664a73e5fc68 100644
|
| --- a/runtime/bin/io_buffer.h
|
| +++ b/runtime/bin/io_buffer.h
|
| @@ -11,8 +11,19 @@
|
|
|
| class IOBuffer {
|
| public:
|
| + // Allocate an IO buffer dart object (of type Uint8List) backed by
|
| + // an external byte array.
|
| static Dart_Handle Allocate(intptr_t size, uint8_t **buffer);
|
|
|
| + // Allocate IO buffer storage.
|
| + static uint8_t* Allocate(intptr_t size);
|
| +
|
| + // Function for disposing of IO buffer storage. All backing storage
|
| + // for IO buffers must be freed using this function.
|
| + static void Free(void* buffer) {
|
| + delete[] reinterpret_cast<uint8_t*>(buffer);
|
| + }
|
| +
|
| private:
|
| DISALLOW_ALLOCATION();
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(IOBuffer);
|
|
|