free_network_ptr instead of free_network

This commit is contained in:
Dimitrii
2021-01-30 13:57:21 +03:00
parent 13a0697585
commit 40df8cce91
2 changed files with 4 additions and 2 deletions

View File

@@ -91,6 +91,8 @@ func main() {
// }
}
}
n.Close()
}
func imageToBytes(img image.Image) ([]byte, error) {

View File

@@ -58,7 +58,7 @@ func (n *YOLONetwork) Close() error {
if n.cNet == nil {
return errNetworkNotInit
}
C.free_network(*n.cNet)
C.free_network_ptr(n.cNet)
n.cNet = nil
return nil
}