android: camera_hal_manager: Clean up resources when terminating
The CameraHalManager starts the libcamera CameraManager and creates CameraProxy instances for each camera in the system. Clean up those resources when the CameraHalManager terminates. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
dadd1fd8fe
commit
3e4672f159
1 changed files with 4 additions and 0 deletions
|
@ -90,6 +90,10 @@ void CameraHalManager::run()
|
||||||
|
|
||||||
/* Now start processing events and messages. */
|
/* Now start processing events and messages. */
|
||||||
exec();
|
exec();
|
||||||
|
|
||||||
|
/* Clean up the resources we have allocated. */
|
||||||
|
proxies_.clear();
|
||||||
|
cameraManager_->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
CameraProxy *CameraHalManager::open(unsigned int id,
|
CameraProxy *CameraHalManager::open(unsigned int id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue