libcamera/Documentation
Laurent Pinchart 98bd9cb8c9 libcamera: signal: Disconnect signal automatically on slot deletion
When a signal is connected to a member function slot, the slot is not
disconnected when the slot object is deleted. This can lead to calling a
member function of a deleted object if the signal isn't disconnected
manually by the slot object's destructor.

Make signal handling easier by implementing a base Object class that
tracks all connected signals and disconnects from them automatically
when the object is deleted, using template specialization resolution in
the Signal class.

As inheriting from the Object class may to a too harsh requirement for
Signal usage in applications, keep the existing behaviour working if the
slot doesn't inherit from the Object class. We may reconsider this later
and require all slot objects to inherit from the Object class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-02-13 13:23:43 +02:00
..
api-html Documentation: Add placeholder for Doxygen-generated API documentation 2019-01-11 17:17:22 +02:00
theme Documentation: Add custom theme 2019-01-11 15:26:25 +02:00
coding-style.rst utils: checkstyle: Add support for clang-format 2019-01-22 14:30:00 +02:00
conf.py Documentation: Update copyright years 2019-01-11 15:26:31 +02:00
contributing.rst licenses: Add the Developer CoO 2019-01-02 21:59:46 +02:00
docs.rst Documentation: Remove | on the left side of diagrams 2018-12-14 15:34:00 +02:00
Doxyfile.in libcamera: signal: Disconnect signal automatically on slot deletion 2019-02-13 13:23:43 +02:00
index.rst Documentation: Add placeholder for Doxygen-generated API documentation 2019-01-11 17:17:22 +02:00
meson.build Documentation: quieten sphinx-build output 2019-01-14 09:57:34 +00:00