robotmedia / RMStore

A lightweight iOS library for In-App Purchases
Apache License 2.0
2.42k stars 450 forks source link

'strong' attibutes replaced with 'copy' in block properties #138

Open protikhonov opened 9 years ago

protikhonov commented 9 years ago

I've replaced "strong" attribute with "copy" in block properties.

"Note: You should specify copy as the property attribute, because a block needs to be copied to keep track of its captured state outside of the original scope. This isn’t something you need to worry about when using Automatic Reference Counting, as it will happen automatically, but it’s best practice for the property attribute to show the resultant behavior. For more information, see Blocks Programming Topics."

https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html

Krivoblotsky commented 9 years ago

+1. Can you please merge it asap?

protikhonov commented 9 years ago

I don't have write access to this repository. So I'm waiting for merge too.

fulldecent commented 8 years ago

This is an easy enough change. I fully recommend to merge this.

hpique commented 8 years ago

This is not necessary, and I'm generally against as it fosters block memory management paranoia.

See: http://stackoverflow.com/questions/27152580/cocoa-blocks-as-strong-pointers-vs-copy

@Krivoblotsky @protikhonov @fulldecent Any particular reason why you want this merge?