开发者

addTimer: causing SIGABRT?

开发者 https://www.devze.com 2023-03-25 19:51 出处:网络
In xcode timer = [NSTimer timerWithTimeInterval:auto_panic_upadte_secs invocation:panicPendingTickInvoc开发者_如何学Cation repeats:FALSE];

In xcode

timer = [NSTimer timerWithTimeInterval:auto_panic_upadte_secs 
                            invocation:panicPendingTickInvoc开发者_如何学Cation repeats:FALSE];

[[NSRunLoop currentRunLoop] addTimer:timer forMode:NSDefaultRunLoopMode];

It gets past these lines of code, But as soon as I run it just SIGABRTs without/before my invocation happening.

Any idea to do this?


You may need to retain the arguments to your NSInvocation with the method

[panicPendingTickInvocation retainArguments];

To stop and autoreleased arguments from being released before you timer firers.

0

精彩评论

暂无评论...
验证码 换一张
取 消