Function rs2_software_sensor_detach

Function Documentation

void rs2_software_sensor_detach(rs2_sensor *sensor, rs2_error **error)

Sensors hold the parent device in scope via a shared_ptr. This function detaches that so that the software sensor doesn’t keep the software device alive. Note that this is dangerous as it opens the door to accessing freed memory if care isn’t taken.

Parameters:
  • sensor[in] the software sensor

  • error[out] if non-null, recieves any error that occurs during this call, otherwise, errors are ignored