Message ID | 20200821064023.12722-1-email@uajain.com |
---|---|
State | Accepted |
Commit | cfb5eb31f6a5194bcab4d0c3f636ebf69431b18e |
Headers | show |
Series |
|
Related | show |
Hi Umang, Thank you for the patch. On Fri, Aug 21, 2020 at 06:40:28AM +0000, Umang Jain wrote: > 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> Oops, indeed. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Will push shortly. > --- > 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<MyObject> { > * void operator()(MyObject *obj) > * { > - * delete obj; > + * obj->deleteLater(); > * } > * }; > *
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<MyObject> { * void operator()(MyObject *obj) * { - * delete obj; + * obj->deleteLater(); * } * }; *
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> --- src/libcamera/object.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)