内存泄漏问题
This commit is contained in:
parent
4c1a397775
commit
59ae9d7f6f
|
|
@ -65,8 +65,16 @@ func SetDeviceCurrentFrameV2(frame *gocv.Mat, device_id int) error {
|
|||
//设置当前帧
|
||||
switch device_id {
|
||||
case 1:
|
||||
err := Device1CurrentFrame.Close()
|
||||
if err != nil {
|
||||
log.Printf("设备:%d, 错误: 无法关闭帧\n", device_id)
|
||||
}
|
||||
Device1CurrentFrame = *frame
|
||||
case 50:
|
||||
err := Device50CurrentFrame.Close()
|
||||
if err != nil {
|
||||
log.Printf("设备:%d, 错误: 无法关闭帧\n", device_id)
|
||||
}
|
||||
Device50CurrentFrame = *frame
|
||||
}
|
||||
frame_count, ok := DeviceFrameCount.Load(device_id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue