static void __RSTimerClassDeallocate(RSTypeRef rs) { RSTimerRef timer = (RSTimerRef)rs; struct __RSTimer *_timer = (struct __RSTimer *)timer; if (__RSTimerIsTimer(timer)) { if (timer->_dps_timer) { // __dps_timer_invalid(timer->_dps_timer); if (__RSTimerIsSuspend(timer)) { RSExceptionCreateAndRaise(RSAllocatorSystemDefault, RSGenericException, RSSTR("BUG: RSTimer want to invalidate a suspend timer"), RSAutorelease(RSDictionaryCreateWithObjectsAndOKeys(RSAllocatorSystemDefault, timer, RSExceptionObject, nil))); return; } __dps_timer_release(timer->_dps_timer); } _timer->_dps_timer = nil; } memset(&_timer->_descriptor, 0, sizeof(struct __RSTimerDescriptor)); if (timer->_userInfo) RSRelease(timer->_userInfo); }
RSExport RSDictionaryRef RSDictionaryWithObjectForKey(RSTypeRef object, RSTypeRef key) { return RSAutorelease(RSDictionaryCreateWithObjectsAndOKeys(RSAllocatorSystemDefault, object, key, NULL)); }