I just added webcam support to my application using the video integration library and OpenCV.
The video stream is located in QThread (manufacturer) and emits a signal sending QImage * for my application to update the graphic element it needs.
The memory management side is that I delete QImage * in the consumer slot as soon as the slot finishes using it. The problem is that I would like more than one object to accept QImage * data.
In this case, I now need to track all the consumers (with reference counting) of the data, and then delete QImage * (most likely in the producer thread) when they are all finished?
source
share