mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
Explicitly release all the intermediate results
This commit is contained in:
@@ -233,6 +233,15 @@ public class StandardCVPipeline extends CVPipeline<StandardCVPipelineResult, Sta
|
||||
|
||||
memManager.run();
|
||||
|
||||
// release all the results
|
||||
erodeDilateResult.getLeft().release();
|
||||
hsvResult.getLeft().release();
|
||||
findContoursResult.getLeft().forEach(Mat::release);
|
||||
filterContoursResult.getLeft().forEach(Mat::release);
|
||||
speckleRejectResult.getLeft().forEach(Mat::release);
|
||||
groupContoursResult.getLeft().forEach(TrackedTarget::release);
|
||||
sortContoursResult.getLeft().forEach(TrackedTarget::release);
|
||||
|
||||
return new StandardCVPipelineResult(collect2dTargetsResult.getLeft(), outputMat, totalPipelineTimeNanos);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user