Optimize map operations
This commit is contained in:
parent
b9495cd1bb
commit
c44ae5888c
@ -17,10 +17,9 @@ public class CallbackHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void unRegister(Event event) {
|
public static void unRegister(Event event) {
|
||||||
HashSet<EventListener> list = listeners.get(event);
|
HashSet<EventListener> list = listeners.remove(event);
|
||||||
if (list != null) {
|
if (list != null) {
|
||||||
list.clear();
|
list.clear();
|
||||||
listeners.remove(event);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user