From patchwork Tue Jan 15 14:07:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 229 Return-Path: Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D8D260C78 for ; Tue, 15 Jan 2019 15:07:48 +0100 (CET) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id AA13920001C; Tue, 15 Jan 2019 14:07:47 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Jan 2019 15:07:47 +0100 Message-Id: <20190115140749.8297-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190115140749.8297-1-jacopo@jmondi.org> References: <20190115140749.8297-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/4] libcamera: Make Camera destructor public X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 14:07:48 -0000 The Camera class destructor is defined as private, but it needs to be accessed by classes that create Camera instances, such as pipeline handlers. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- include/libcamera/camera.h | 2 +- src/libcamera/pipeline/vimc.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index 9a7579d..d751d2d 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -15,13 +15,13 @@ class Camera { public: Camera(const std::string &name); + virtual ~Camera() { }; const std::string &name() const; void get(); void put(); private: - virtual ~Camera() { }; int ref_; std::string name_; }; diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 720d9c2..00c544c 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -41,6 +41,8 @@ PipeHandlerVimc::~PipeHandlerVimc() if (dev_) dev_->release(); + + delete camera_; } unsigned int PipeHandlerVimc::count()