Definition at line 3995 of file dart_api_impl.cc.
◆ AcquiredData()
dart::AcquiredData::AcquiredData |
( |
void * |
data, |
|
|
intptr_t |
size_in_bytes, |
|
|
bool |
copy |
|
) |
| |
|
inline |
Definition at line 3997 of file dart_api_impl.cc.
3998 : size_in_bytes_(size_in_bytes), data_(
data), data_copy_(
nullptr) {
4000 data_copy_ =
malloc(size_in_bytes_);
4001 memmove(data_copy_, data_, size_in_bytes_);
4002 }
4003 }
void * malloc(size_t size)
static int8_t data[kExtLength]
◆ ~AcquiredData()
dart::AcquiredData::~AcquiredData |
( |
| ) |
|
|
inline |
Definition at line 4009 of file dart_api_impl.cc.
4009 {
4010 if (data_copy_ != nullptr) {
4011 memmove(data_, data_copy_, size_in_bytes_);
4012 memset(data_copy_, kZapReleasedByte, size_in_bytes_);
4013 free(data_copy_);
4014 }
4015 }
◆ GetData()
void * dart::AcquiredData::GetData |
( |
| ) |
const |
|
inline |
Definition at line 4006 of file dart_api_impl.cc.
4006{ return data_copy_ != nullptr ? data_copy_ : data_; }
The documentation for this class was generated from the following file: