build: upgrade to go 1.17 and upgrade dependencies

This commit is contained in:
2021-09-02 12:03:56 +02:00
parent b48ac6679e
commit 5436dfebc2
761 changed files with 133691 additions and 105807 deletions

11
vendor/gocv.io/x/gocv/mat_profile.go generated vendored
View File

@@ -58,6 +58,12 @@ func init() {
}
}
// addMatToProfile records Mat to the MatProfile.
func addMatToProfile(p C.Mat) {
MatProfile.Add(p, 1)
return
}
// newMat returns a new Mat from a C Mat and records it to the MatProfile.
func newMat(p C.Mat) Mat {
m := Mat{p: p}
@@ -67,8 +73,11 @@ func newMat(p C.Mat) Mat {
// Close the Mat object.
func (m *Mat) Close() error {
C.Mat_Close(m.p)
// NOTE: The pointer must be removed from the profile before it is deleted to
// avoid a data race.
MatProfile.Remove(m.p)
C.Mat_Close(m.p)
m.p = nil
m.d = nil
return nil
}