Skip to content

Conversation

@anmelle-slamcore
Copy link
Contributor

Custom deleters for std::unique_ptr are not invoked if the owned pointer is null.
Therefore, the function setup to acquire_metadata at the end of the scope will never fire.

Solution is to pass a valid pointer, and let the custom deleter delete the object.

@dorodnic
Copy link
Contributor

dorodnic commented Mar 30, 2020

Hi @anmelleSlamcore
Thank you for the patch, I was not familiar with this behaviour.

Copy link
Contributor

@ev-mp ev-mp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @anmelleSlamcore ,
Thank you for the contribution!

@ev-mp ev-mp merged commit 44e4cfb into realsenseai:development Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants