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: 9558886f7a ("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>
This commit is contained in:
Umang Jain
2020-08-21 06:40:28 +00:00
committed by Laurent Pinchart
parent 20be38a0db
commit cfb5eb31f6

View File

@@ -125,7 +125,7 @@ Object::~Object()
* struct Deleter : std::default_delete<MyObject> {
* void operator()(MyObject *obj)
* {
* delete obj;
* obj->deleteLater();
* }
* };
*