# litert::Newlocator


`#include <litert_buffer_ref.h>`

A memory allocator based on `new` and `delete`.

## Summary

<br />

Details Template Parameters `ByteT` The byte type of the buffer.

| ### Public functions ||
|---|---|
| `https://developers.google.com/edge/api/litert/c/structlitert/1-1-newlocator#structlitert_1_1_newlocator_1a142a8205af7a96dc4ff3409daa6c3c93(ByteT *d)` | `void` Deletes the given array. |
| `https://developers.google.com/edge/api/litert/c/structlitert/1-1-newlocator#structlitert_1_1_newlocator_1a11e8a51042bf1f6a4e81a0950a71df05(size_t bytes)` | `ByteT *` Allocates an array of the specified size. |

## Public functions

### operator()

```
void litert::Newlocator::operator()(
  ByteT *d
)
```
Deletes the given array.

### operator()

```
ByteT * litert::Newlocator::operator()(
  size_t bytes
)
```
Allocates an array of the specified size.

<br />

Details Parameters `bytes` The size of the array in bytes. **Returns** A pointer to the allocated array.