Skip to content

Conversation

@ArtemisQT
Copy link

stim_remove_event(int8_t id) 这个函数内部会调用recycle_event(struct stim_event *event);但是recycle_event这个函数默认是在当前链表list_manager.cur_index删除对应的event。而stim_remove_event(int8_t id)这个函数在找出id对应的event的时候会遍历list_manager.list[i],此时找出要recycle的event不一定就在当前链表中list_manager.list[list_manager.cur_index]。recycle_event(struct stim_event *event)内部还会调用remove_node(struct stim_event *event,struct stim_event_list *list)。调用remove_node这个函数的前提是传入的event必须确实位于list链表中,否则会出现异常。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant