diff options
author | Umang Jain <email@uajain.com> | 2020-08-21 06:40:28 +0000 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-08-24 01:42:38 +0300 |
commit | cfb5eb31f6a5194bcab4d0c3f636ebf69431b18e (patch) | |
tree | 7300a2b65006e4429ba00e18e802c48a2d350add /src | |
parent | 20be38a0db2bfcbd9973ea63ba30e41fca83b200 (diff) |
libcamera: object: Fix deleteLater() sample code
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 <email@uajain.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp index 647ccda7..cd83c684 100644 --- a/src/libcamera/object.cpp +++ b/src/libcamera/object.cpp @@ -125,7 +125,7 @@ Object::~Object() * struct Deleter : std::default_delete<MyObject> { * void operator()(MyObject *obj) * { - * delete obj; + * obj->deleteLater(); * } * }; * |