diff --git a/pom.xml b/pom.xml
index 1922814..142fa4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.jaudiolibs
jnajack
- 1.1.0
+ 1.1.1
jar
jnajack
diff --git a/src/main/java/org/jaudiolibs/jnajack/JackClient.java b/src/main/java/org/jaudiolibs/jnajack/JackClient.java
index b1fd4cd..6e90d0d 100644
--- a/src/main/java/org/jaudiolibs/jnajack/JackClient.java
+++ b/src/main/java/org/jaudiolibs/jnajack/JackClient.java
@@ -55,7 +55,8 @@ public class JackClient {
final Jack jack;
final JackLibrary jackLib;
final String name;
- final JackLibrary._jack_client clientPtr; // package private
+
+ JackLibrary._jack_client clientPtr; // package private
private ProcessCallbackWrapper processCallback; // reference kept - is in use!
private BufferSizeCallbackWrapper buffersizeCallback;
@@ -395,7 +396,7 @@ public void deactivate() {
/**
* Disconnects this client from the JACK server.
*/
- public void close() {
+ public synchronized void close() {
try {
if (clientPtr != null) {
jackLib.jack_client_close(clientPtr);
@@ -404,7 +405,7 @@ public void close() {
} catch (Throwable e) {
LOG.log(Level.SEVERE, CALL_ERROR_MSG, e);
} finally {
-// clientPtr = null;
+ clientPtr = null;
}
}
@@ -453,11 +454,6 @@ private void processShutdown() {
}
}
- @Override
- protected void finalize() throws Throwable {
- super.finalize();
- close();
- }
private class ProcessCallbackWrapper implements JackLibrary.JackProcessCallback {