From 8ce80010e2345300dc74f69ea7bd904685ec692c Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Tue, 19 May 2020 17:09:13 +0100 Subject: 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 --- simple-cam.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'simple-cam.cpp') 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(); -- cgit v1.2.1