Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
servadmin committed May 19, 2018
1 parent e0ad7d9 commit cc9455e
Show file tree
Hide file tree
Showing 23 changed files with 13 additions and 9 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .project
100644 → 100755
Empty file.
22 changes: 13 additions & 9 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ which is currently 3.2.0:

### The current way to free native memory

OpenCV 2.4 and 3.2 use a Python code generator
OpenCV 2.4 through 4.0.0-pre use a Python code generator
`modules/java/generator/gen_java.py` to generate Java bindings during the build
process. The generated code to free native resources looks like:

Expand Down Expand Up @@ -286,6 +286,18 @@ to do things incorrectly.
* [Opencv sgjava](https://github.com/Itseez/opencv/pull/4014)
* [New Java memory mgt doc](https://github.com/Itseez/opencv/pull/4019)
* [Added finalize back in](https://github.com/Itseez/opencv/pull/4029)
* [Get rid of finalizers in Java bindings](https://github.com/opencv/opencv/issues/8683)

#### Fix template
* Edit `modules/java/generator/templates/java_class.prolog`
* Find
```
public final long nativeObj;
```
* Change to
```
public long nativeObj;
```

#### Fix Mat
* Edit `modules/core/misc/java/src/java/core+Mat.java`
Expand All @@ -307,14 +319,6 @@ public void free() {
}
}
```
* Find
```
public final long nativeObj;
```
* Change to
```
public long nativeObj;
```

This will create a free() method that replaces finalize() thus you must make
sure you call free() when you are done with the Mat. I also removed the final
Expand Down
Empty file modified build.xml
100644 → 100755
Empty file.
Empty file modified images/OpenCVFree_locks1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVFree_locks2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVFree_no_gc1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVNewMat_gc1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVNewMat_no_gc1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVRelease_locks1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVRelease_locks2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVRelease_no_gc1.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/OpenCVRelease_no_gc2.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/title.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified manifest.mf
100644 → 100755
Empty file.
Empty file modified nbproject/build-impl.xml
100644 → 100755
Empty file.
Empty file modified nbproject/genfiles.properties
100644 → 100755
Empty file.
Empty file modified nbproject/project.properties
100644 → 100755
Empty file.
Empty file modified nbproject/project.xml
100644 → 100755
Empty file.
Empty file modified src/com/codeferm/opencv/OpenCVFindContours.java
100644 → 100755
Empty file.
Empty file modified src/com/codeferm/opencv/OpenCVFree.java
100644 → 100755
Empty file.
Empty file modified src/com/codeferm/opencv/OpenCVNewMat.java
100644 → 100755
Empty file.
Empty file modified src/com/codeferm/opencv/OpenCVRelease.java
100644 → 100755
Empty file.

0 comments on commit cc9455e

Please sign in to comment.