[libcamera-devel,3/5] libcamera: pipeline: Rework class destructor

Message ID 20190125170400.24821-4-jacopo@jmondi.org
State Accepted
Headers show
Series
  • libcamera: camera data: Address review comments
Related show

Commit Message

Jacopo Mondi Jan. 25, 2019, 5:03 p.m. UTC
Remove comment and do not delete a class member, as it will be destroyed
already with the instance that contains it.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline_handler.cpp | 7 -------
 1 file changed, 7 deletions(-)

Comments

Niklas Söderlund Jan. 25, 2019, 10:42 p.m. UTC | #1
Hi Jacopo,

Thanks for your patch.

On 2019-01-25 18:03:58 +0100, Jacopo Mondi wrote:
> Remove comment and do not delete a class member, as it will be destroyed
> already with the instance that contains it.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/pipeline_handler.cpp | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
> index cca5576..e75bf0f 100644
> --- a/src/libcamera/pipeline_handler.cpp
> +++ b/src/libcamera/pipeline_handler.cpp
> @@ -71,15 +71,8 @@ PipelineHandler::PipelineHandler(CameraManager *manager)
>  {
>  }
>  
> -/**
> - * \brief Delete the pipeline handler
> - *
> - * Release the cameraData_ map, causing all data there referenced to be
> - * deleted, as they are stored as unique_ptr<CameraData>
> - */
>  PipelineHandler::~PipelineHandler()
>  {
> -	cameraData_.clear();
>  };
>  
>  /**
> -- 
> 2.20.1
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp
index cca5576..e75bf0f 100644
--- a/src/libcamera/pipeline_handler.cpp
+++ b/src/libcamera/pipeline_handler.cpp
@@ -71,15 +71,8 @@  PipelineHandler::PipelineHandler(CameraManager *manager)
 {
 }
 
-/**
- * \brief Delete the pipeline handler
- *
- * Release the cameraData_ map, causing all data there referenced to be
- * deleted, as they are stored as unique_ptr<CameraData>
- */
 PipelineHandler::~PipelineHandler()
 {
-	cameraData_.clear();
 };
 
 /**