Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicitly atomic accessors are unsafe when only half-synthesized #79

Open
danielpunkass opened this issue Oct 3, 2012 · 1 comment

Comments

@danielpunkass
Copy link
Contributor

A variety of properties in iMedia trigger warnings when the compiler detects that the property is implicitly atomic, but has been half-implemented (a getter or setter has been implemented), overriding the ability of the compiler to guarantee atomicity.

I think that for many of these, we probably could just change the atomicity of the property to "nonatomic" but I am not confident enough about the threading behavior of iMedia to make this change on my own. For each of the affected properties below, a decision should be made and a course of action followed:

  1. If the property should be considered nonatomic, then the nonatomic value should be added to its declaration, quieting the warning.
  2. If the property should be considered atomic, then the existing accessor method (setter or getter) should be revised to properly implement some kind of locking mechanism, and the missing accessor should be written from scratch complying with that same locking mechanism.

IMBNodeViewController.h
@Property (retain) IMBLibraryController* libraryController;

IMBObjectViewController.h
@Property (retain) IMBLibraryController* libraryController;

IMBApertureParser.h
@Property (assign) NSInteger version;

IMBiTunesParser.h
@Property (retain) NSDictionary* plist;

IMBSafariBookmarkParser.h
@Property (retain) NSDictionary* plist;

IMBAppleMediaParser.h
@Property (retain) NSDictionary* plist;

@mikeabdullah
Copy link
Collaborator

iMedia is chockablock full of atomic @properties where I'm fairly sure the reason is purely "it's the default" or "it's safer, even though of no benefit in practice". Trouble is @peterb180369 is pretty much the only person in a position to say for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants