cleanup

이 메소드는 RiCOSTimer 오브젝트 삭제 후 메모리를 정리합니다.

시그니처
void RiCOSTimer_cleanup (RiCOSTimer * const me);
매개변수
me

이후에 정리할 RiCOSTimer 오브젝트입니다.

예제
void RiCOSTimer_cleanup(RiCOSTimer * const me)
{
   if (me == NULL) return;

   if (me->hThread) {
      RiCOSHandle executedOsHandle =
         RiCOSTask_getCurrentTaskHandle();
      /* A handle to this 'thread' */
      RiCOSHandle myOsHandle = me->hThread;
      RiCBoolean onMyThread = ((executedOsHandle ==
         myOsHandle) ? TRUE : FALSE);
      if (onMyThread) {
         RiCOSTask_endMyTask((void*)myOsHandle);
      }
      else {
         RiCOSTask_endOtherTask((void*)myOsHandle);
      }
      me->hThread = 0;
   }
}

피드백