I am storing my blocks while my web service goes off and talks to my server. Therefore I am using [myBlock copy]
to keep a reference to my block.
Once I have got my data, and executed the block, do I call [myBlock release]
, or do I use Block_release(myBlock)
? I can find reference to both.
Block_release()
is there for when you're only using blocks in C, and not Objective-C.
When using Objective-C you can use the release
and copy
methods to make your code look and feel more like the rest of the ObjC around it.
I imagine they both do exactly the same thing, and that the objc method is just a wrapper around the call to Block_release()
anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With