Open zhujun19790920 opened 3 years ago
static ret_t object_compositor_on_destroy(object_t obj) { emitter_t obj1 = NULL; emitter_t obj2 = NULL; object_compositor_t o = OBJECT_COMPOSITOR(obj); return_value_if_fail(o != NULL, RET_BAD_PARAMS);
obj1 = EMITTER(o->obj1); obj2 = EMITTER(o->obj2); return_value_if_fail(obj1 != NULL && obj2 != NULL, RET_BAD_PARAMS);
emitter_off_by_ctx(obj1, o); emitter_off_by_ctx(obj1, o); // 这里的obj1应该是obj2吧 OBJECT_UNREF(o->obj1); OBJECT_UNREF(o->obj2);
return RET_OK; }
好的,感谢。
static ret_t object_compositor_on_destroy(object_t obj) { emitter_t obj1 = NULL; emitter_t obj2 = NULL; object_compositor_t o = OBJECT_COMPOSITOR(obj); return_value_if_fail(o != NULL, RET_BAD_PARAMS);
obj1 = EMITTER(o->obj1); obj2 = EMITTER(o->obj2); return_value_if_fail(obj1 != NULL && obj2 != NULL, RET_BAD_PARAMS);
emitter_off_by_ctx(obj1, o); emitter_off_by_ctx(obj1, o); // 这里的obj1应该是obj2吧 OBJECT_UNREF(o->obj1); OBJECT_UNREF(o->obj2);
return RET_OK; }