Fix mom issues
@@ -707,6 +707,7 @@ extension AppDelegate: WCSessionDelegate {
from threading import Event
from rubicon.objc import ObjCClass
from pyto import Python
+ from Foundation import NSAutoreleasePool
import runpy
import watch as wt
import sys
@@ -716,6 +717,8 @@ extension AppDelegate: WCSessionDelegate {
import datetime as dt
import __watch_script_store__ as store
+ pool = NSAutoreleasePool.alloc().init()
+
wt.__shared_complication__ = None
delegate = ObjCClass("Pyto.AppDelegate").shared
@@ -761,6 +764,7 @@ extension AppDelegate: WCSessionDelegate {
complication = wt.__PyComplication__.sendObject
delegate.callComplicationHandlerWithId("\(complicationId)", complication=complication)
+ pool.release()
Event().wait()
"""))
