Commit b3a138ff authored by hpi1's avatar hpi1

EventManager: clean up at shutdown

parent 9e9800b3
......@@ -44,6 +44,20 @@ public class EventManager implements ResourceServer {
return instance;
}
public static void shutdown() {
EventManager e;
synchronized (EventManager.class) {
e = instance;
instance = null;
}
if (e != null) {
e.exclusiveUserEventListener.clear();
e.sharedUserEventListener.clear();
e.exclusiveAWTEventListener.clear();
e.resourceStatusEventListeners.clear();
}
}
public boolean addUserEventListener(UserEventListener listener, ResourceClient client, UserEventRepository userEvents)
throws IllegalArgumentException {
if (client == null)
......
......@@ -138,6 +138,7 @@ public class Libbluray {
BDToolkit.shutdownDisc();
SIManagerImpl.shutdown();
IxcRegistry.shutdown();
EventManager.shutdown();
Status.shutdown();
} catch (Throwable e) {
e.printStackTrace();
......
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