Commit d67d32af authored by Andrey Pavlenko's avatar Andrey Pavlenko

Revert of "Merge pull request #4014 from sgjava:opencv-sgjava" (reverted from…

Revert of "Merge pull request #4014 from sgjava:opencv-sgjava" (reverted from commit 52fa55a7)
parent 3136010e
...@@ -640,7 +640,6 @@ public class Mat { ...@@ -640,7 +640,6 @@ public class Mat {
{ {
n_release(nativeObj); n_release(nativeObj);
n_delete(nativeObj);
return; return;
} }
...@@ -907,6 +906,12 @@ public class Mat { ...@@ -907,6 +906,12 @@ public class Mat {
return retVal; return retVal;
} }
@Override
protected void finalize() throws Throwable {
n_delete(nativeObj);
super.finalize();
}
// javadoc:Mat::toString() // javadoc:Mat::toString()
@Override @Override
public String toString() { public String toString() {
......
...@@ -1530,7 +1530,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname ...@@ -1530,7 +1530,7 @@ JNIEXPORT $rtype JNICALL Java_org_opencv_${module}_${clazz}_$fname
# finalize() # finalize()
ci.j_code.write( ci.j_code.write(
""" """
public void delete() { protected void delete() {
delete(nativeObj); delete(nativeObj);
} }
""" ) """ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment