Skip to content

Commit

Permalink
Merge pull request #49 from christianrauch/fix_leaks
Browse files Browse the repository at this point in the history
fix memory leaks on destruction
  • Loading branch information
christianrauch authored Jun 1, 2024
2 parents 0c5dc7c + b83205d commit 3c12c4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/CameraNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@ CameraNode::~CameraNode()
// stop camera
if (camera->stop())
std::cerr << "failed to stop camera" << std::endl;
allocator->free(stream);
allocator.reset();
camera->release();
camera.reset();
camera_manager.stop();
for (const auto &e : buffer_info)
if (munmap(e.second.data, e.second.size) == -1)
Expand Down

0 comments on commit 3c12c4c

Please sign in to comment.