diff --git a/src/Python/asst/asst.py b/src/Python/asst/asst.py index b53339442f..45f3bf5f2d 100644 --- a/src/Python/asst/asst.py +++ b/src/Python/asst/asst.py @@ -86,14 +86,15 @@ class Asst: ``callback``: 回调函数 ``arg``: 自定义参数 """ - + self.__callback = callback if callback: self.__ptr = Asst.__lib.AsstCreateEx(callback, arg) else: self.__ptr = Asst.__lib.AsstCreate() def __del__(self): - Asst.__lib.AsstDestroy(self.__ptr) + if self.__callback: + Asst.__lib.AsstDestroy(self.__ptr) self.__ptr = None def set_instance_option(self, option_type: InstanceOptionType, option_value: str): diff --git a/src/Python/asst/utils.py b/src/Python/asst/utils.py index 4f28428f6a..f65e0ca05e 100644 --- a/src/Python/asst/utils.py +++ b/src/Python/asst/utils.py @@ -24,6 +24,10 @@ class Message(Enum): AllTasksCompleted = auto() + AsyncCallInfo = auto() + + Destroyed = auto() + TaskChainError = 10000 TaskChainStart = auto()