Skip to content

Fixed some memory leaks - #8142

Merged
ev-mp merged 1 commit into
realsenseai:developmentfrom
Rheel17:fix-memory-leaks
Jan 17, 2021
Merged

Fixed some memory leaks#8142
ev-mp merged 1 commit into
realsenseai:developmentfrom
Rheel17:fix-memory-leaks

Conversation

@Rheel17

@Rheel17 Rheel17 commented Jan 12, 2021

Copy link
Copy Markdown
Contributor

Fixes some memory leaks:

  1. In the Linux backend, the deleter of a std::unique_ptr didn't call delete;
  2. The hdr_config type and its sensor were holding mutual shared pointers to each other, causing them to not be deleted;
  3. In synthetic-stream.cpp, the on_set method is called on a ptr_option, which stores the function passed to that method. However, the lambda passed captures the shared pointer, giving another shared pointer loop.

@ev-mp

ev-mp commented Jan 14, 2021

Copy link
Copy Markdown
Contributor

@Rheel17 , thank you for the contribution.
Actually we've been doing a parallel investigation into some of the issues highlighted, so we'll check the proposed changes and update.

@ev-mp ev-mp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@Rheel17 , it looks good.
Thank you very much indeed!

@ev-mp
ev-mp merged commit 0549f5e into realsenseai:development Jan 17, 2021
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.

2 participants