
Module: ppl/ppl Branch: master Commit: efbf989a1e9b1a2b0fb242de6c42cf6c74d241be URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=efbf989a1e9b1...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Thu Apr 30 17:07:37 2009 +0200
Fixed initialization for Java interface (explicit initialization required). Java class Parma_Polyhedra_Library now has two new static methods: initialize_library() and finalize_library(). The first one, to be called after loading the library and before calling any other library method, will provide proper initialization of both the C++ data structures and the Java class and field/method ID caches. The second one, to be called when no longer using the library, will clear the cache, deleting all stored global references, thereby allowing for the PPL Java classes to be garbage collected.
---
interfaces/Java/jni/ppl_java_common.cc | 307 +++++++++++++------- interfaces/Java/jni/ppl_java_common.defs.hh | 167 ++++++------ interfaces/Java/jni/ppl_java_common.inlines.hh | 41 +-- interfaces/Java/jni/ppl_java_globals.cc | 82 +++--- .../Parma_Polyhedra_Library.java | 11 + interfaces/Java/tests/C_Polyhedron_test1.java | 12 +- interfaces/Java/tests/MIP_Problem_test1.java | 12 +- interfaces/Java/tests/NNC_Polyhedron_test1.java | 12 +- .../Java/tests/Parma_Polyhedra_Library_test1.java | 12 +- .../ppl_interface_generator_java_test_java.m4 | 2 + interfaces/Java/tests/ppl_java_tests_common | 1 + 11 files changed, 366 insertions(+), 293 deletions(-)
Diff: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commitdiff;h=efbf989a1...