intel / node-realsense

MIT License
24 stars 21 forks source link

[librealsense]Avoid double freeing the memory #219

Closed minggangw closed 7 years ago

minggangw commented 7 years ago

Currently, the framedata is freed by the C++ side in the deconstruction:

FrameData::~FrameData() { free(data_.data); }

This will lead to freeing the memory twice, because the ownership of the data will be transferred to Nan::NewBuffer later.