is rs2::frame a unique smart pointer like unique_ptr?
Hi,
From the following link:
https://dev.intelrealsense.com/docs/frame-management
"rs2::frame is a smart reference to the underlying frame - as long as you hold ownership of the rs2::frame the underlying memory is exclusively yours and will not be modified or freed."
Does this mean rs2::frame is a unique smart pointer?
Thanks.
Yixun
-
Hi Yixun Liu My understanding is that the smart pointer is the frame handle that a frame is wrapped in, and get_data() is used to retrieve data from the frame handle.
-
I researched your question above carefully but the only pointer related references in the SDK's official rs2::frame documentation page relate to get_data() and get_profile()
https://intelrealsense.github.io/librealsense/doxygen/classrs2_1_1frame.html
The relationship of rs2::frame to get_data is referenced in the frame buffering documentation that you linked to at the beginning of this case.
"If no processing was necessary on the frame, rs2::frame::get_data will provide a direct pointer to the buffer provided by the underlying driver stack. No extra memory copies are performed in this case".
Please sign in to leave a comment.
Comments
3 comments