summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/guides/application-developer.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst
index 31557a60..51c8256e 100644
--- a/Documentation/guides/application-developer.rst
+++ b/Documentation/guides/application-developer.rst
@@ -63,9 +63,13 @@ variable for the camera to support the event call back later:
Create a Camera Manager instance at the beginning of the main function, and then
start it. An application should only create a single Camera Manager instance.
+The CameraManager can be stored in a unique_ptr to automate deleting the
+instance when it is no longer used, but care must be taken to ensure all cameras
+are released explicitly.
+
.. code:: cpp
- CameraManager *cm = new CameraManager();
+ std::unique_ptr<CameraManager> *cm = std::make_unique<CameraManager>();
cm->start();
During the application initialization, the Camera Manager is started to
@@ -560,6 +564,9 @@ uses, so needs to do the following:
return 0;
+In this instance the CameraManager will automatically be deleted by the
+unique_ptr implementation when it goes out of scope.
+
Build and run instructions
--------------------------