summaryrefslogtreecommitdiff
path: root/simple-cam.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-05-19 17:09:13 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2020-05-19 17:09:13 +0100
commit8ce80010e2345300dc74f69ea7bd904685ec692c (patch)
tree438b399316f0873f4acd1ffd6afb20cd50112f14 /simple-cam.cpp
parent2a0e3cd7921e388054872df2b89217cdee24575a (diff)
simple-cam: Delete allocator
It is important to delete the created allocator, otherwise it holds on to references of the media-device, and complains at shutdown. Clean up neatly by deleting the object before after the stream resources are free. That could potentially all be done by the destructor anyway. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'simple-cam.cpp')
-rw-r--r--simple-cam.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/simple-cam.cpp b/simple-cam.cpp
index 0b187b3..763341a 100644
--- a/simple-cam.cpp
+++ b/simple-cam.cpp
@@ -351,6 +351,7 @@ int main()
*/
camera->stop();
allocator->free(stream);
+ delete allocator;
camera->release();
camera.reset();
cm->stop();