Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AppDelegate
- def application(application, didFinishLaunchingWithOptions:launchOptions)
- test_perform_selector
- true
- end
- def test_perform_selector
- foo = "bar"
- foo.retain # Crashes without this
- wait_1_second do
- puts foo
- foo.release # Crashes without this
- end
- end
- def wait_1_second(&block)
- performSelector("run_block:", withObject:block, afterDelay:1.0)
- end
- def run_block(block)
- block.call
- end
- end
Add Comment
Please, Sign In to add comment