mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Fix driver mode memory leak with libpicam (#171)
This commit is contained in:
committed by
GitHub
parent
e608d073bd
commit
e4b6559b81
@@ -64,6 +64,7 @@ public class DriverModePipeline
|
||||
if (inputMat.channels() == 1 && PicamJNI.isSupported()) {
|
||||
long colorMatPtr = PicamJNI.grabFrame(true);
|
||||
if (colorMatPtr == 0) throw new RuntimeException("Got null Mat from GPU Picam driver");
|
||||
inputMat.release();
|
||||
inputMat = new Mat(colorMatPtr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user