summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/isode')
-rw-r--r--src/com/isode/stroke/eventloop/SimpleEventLoop.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/com/isode/stroke/eventloop/SimpleEventLoop.java b/src/com/isode/stroke/eventloop/SimpleEventLoop.java
index a471457..c3919eb 100644
--- a/src/com/isode/stroke/eventloop/SimpleEventLoop.java
+++ b/src/com/isode/stroke/eventloop/SimpleEventLoop.java
@@ -26,11 +26,16 @@ public class SimpleEventLoop extends EventLoop {
@Override
protected void finalize() throws Throwable {
- synchronized (eventsMutex_) {
- if (!events_.isEmpty()) {
- System.err.println("Warning: Pending events in SimpleEventLoop at finalize time");
- }
- }
+ try {
+ synchronized (eventsMutex_) {
+ if (!events_.isEmpty()) {
+ System.err.println("Warning: Pending events in SimpleEventLoop at finalize time");
+ }
+ }
+ }
+ finally {
+ super.finalize();
+ }
}
public void run() {