wrapped depth pixel pointer in unique_ptr to avoid memory leaks