void (ID self, String selector, ID keyObject) { final String key = toStringViaUTF8(keyObject); invoke(keyObject, "release"); RunnableInfo info; synchronized (RUNNABLE_LOCK) { info = ourMainThreadRunnables.remove(key); } if (info == null) { return; } ID pool = null; try { if (info.myUseAutoreleasePool) { pool = invoke("NSAutoreleasePool", "new"); } info.myRunnable.run(); } finally { if (pool != null) { invoke(pool, "release"); } } }