[libcamera-devel,0/3] libcamera: Fix leaks and simplify object management with std::unique_ptr<>
mbox series

Message ID 20201212185116.29611-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Fix leaks and simplify object management with std::unique_ptr<>
Related show

Message

Laurent Pinchart Dec. 12, 2020, 6:51 p.m. UTC
Hello,

This small patch series is a follow-up of the switch of
V4L2*::fromEntityName() to std::unique_ptr<>. It replaces more manually
managed pointers with std::unique_ptr<> in pipeline handlers, including
expanding usage of V4L2*::fromEntityName(). I've noticed a memory leak
while writing the code, which is fixed in patch 1/3.

Laurent Pinchart (3):
  libcamera: pipeline: raspberrypi: Don't leak RPiCameraData::sensor_
  libcamera: pipeline: vimc: Use V4L2*::fromEntityName() where possible
  libcamera: pipeline: Manage resources with std::unique_ptr<>

 src/libcamera/pipeline/ipu3/cio2.cpp          | 11 ++-----
 src/libcamera/pipeline/ipu3/cio2.h            |  9 +++--
 .../pipeline/raspberrypi/raspberrypi.cpp      |  7 ++--
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 19 ++++-------
 src/libcamera/pipeline/simple/converter.cpp   |  8 +----
 src/libcamera/pipeline/simple/converter.h     |  3 +-
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  | 12 +++----
 src/libcamera/pipeline/vimc/vimc.cpp          | 33 +++++++------------
 8 files changed, 34 insertions(+), 68 deletions(-)