From patchwork Fri Aug 21 06:40:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 9341 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 22E0BBD87C for ; Fri, 21 Aug 2020 06:40:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 71ABE61F7B; Fri, 21 Aug 2020 08:40:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="aiJgJemg"; dkim-atps=neutral Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D7136037D for ; Fri, 21 Aug 2020 08:40:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type; s=s1; bh=/ql8XLgFqDrItUWI1WJnCgf8pmcuLN/9lUXjIQVt8Zk=; b=aiJgJemg+2zSygcNE3GsZqOeopWsGOSh2qoR+QsDi6UKLBjdgELWb88FmRTSw8DwuXav J5k8TW9xmffj25v/v4hbPEXwa99J1GlWvXzMpw6T09KtOPFuDCNcUhS4skFvTZLszm+jU6 /erRWzHKYDYfpEgJ8BJMrVASTHPCjITBg= Received: by filterdrecv-p3iad2-86945d9569-wzrpx with SMTP id filterdrecv-p3iad2-86945d9569-wzrpx-18-5F3F6C5C-C 2020-08-21 06:40:28.418108887 +0000 UTC m=+45444.000540781 Received: from mail.uajain.com (unknown) by ismtpd0008p1maa1.sendgrid.net (SG) with ESMTP id ot5Pi1K_RrWWo2wg9HuzaA for ; Fri, 21 Aug 2020 06:40:27.671 +0000 (UTC) From: Umang Jain Date: Fri, 21 Aug 2020 06:40:28 +0000 (UTC) Message-Id: <20200821064023.12722-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcHcG1g99dnq0SJ9KzJgHEPgZALHBgBaIAURUQGiQVqrMFtLKDvT4WhEPPTuOhVQfgRC90NGhd+omijUGpHhVgXdWa/yUi6qKQxnIvWGi9YFuk9abFZcOjMtKZ3x155LXktiyD06D9QylIOCpoFz7SmGO5QakteCT1GFmW7POk3JSzqL7yyOks+GOePB2XX01o0GY+4GNJHgWGaQIZWjjozg== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH] libcamera: object: Fix deleteLater() sample code X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Instead of using "delete obj" in the custom deleter of the shared object, we should have been using the "obj->deleteLater()" to explain how the deleteLater() API should be used in practice. Fixes: 9558886f7a85 ("libcamera: object: Add deleteLater() support) Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart --- src/libcamera/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp index 647ccda..cd83c68 100644 --- a/src/libcamera/object.cpp +++ b/src/libcamera/object.cpp @@ -125,7 +125,7 @@ Object::~Object() * struct Deleter : std::default_delete { * void operator()(MyObject *obj) * { - * delete obj; + * obj->deleteLater(); * } * }; *