gocv
gocv copied to clipboard
Can't release memory with gocv.NewMat
Description
When i create a new mat, I used gocv.NewMat, defer x.Close and after i merged 4 image channel pointer the empty mat. When i see the profile, the memory can't be released.
Steps to Reproduce
m := gocv.NewMat()
defer m.Close
gocv.Merge(bgChans, &m)
And when i use cv2.MatProfile to check program. the memory can't be release forever
- Operating System and version:MacOS 12.0.1 / Ubuntu 20.02/ Alpine
- OpenCV version used: 4.5.5
- How did you install OpenCV? Docker with gocv.
- GoCV version used: v0.29.0
- Go version: 1.17.3
Mat.Close()
is a function, is defer m.Close
just typo, or you are using it like that?
Mat.Close()
是一个函数,defer m.Close
只是错字,或者你正在使用它?
I have to record memory address by myself now, because m.Close can't close below the img's space, how can i whole close it
me too,are you fix it?