Possible memory leak using opencv VideoCapture with gstreamer backend

Hi, thanks for the clarification. However, even if I read out the frames with a very basic program like this

if __name__ == "__main__":
    cap = cv2.VideoCapture(0, cv2.CAP_V4L2)
    while True:
        try:
            success, frame = cap.read()
        except KeyboardInterrupt:
            break

using htop I still see the memory used by this process increasing gradually.