/**
* Dispose the agent. Applications should call this once they are done
- * logging.
+ * logging. This dispose function is non-static for backwards
+ * compatibility purposes.
*/
- public static synchronized void dispose() {
- if (instance != null) {
- instance.disposeInstance();
- instance = null;
+ public void dispose() {
+ synchronized (LTTngAgent.class) {
+ if (instance != null) {
+ instance.disposeInstance();
+ instance = null;
+ }
}
return;
}