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

Potential memory leak in DCObjectMapping #78

Open
maxoly opened this issue Sep 24, 2015 · 1 comment
Open

Potential memory leak in DCObjectMapping #78

maxoly opened this issue Sep 24, 2015 · 1 comment

Comments

@maxoly
Copy link

maxoly commented Sep 24, 2015

Since @property without memory attributed use strong for memory storage, converter property in the class DCObjectMapping should be marked with weak attribute to avoid potential memory leak.

This

@interface DCObjectMapping : NSObject <DCMapping>
..
@property(nonatomic, readonly) id <DCValueConverter> converter;
..
@end

Should be changed in this

@interface DCObjectMapping : NSObject <DCMapping>
..
@property(nonatomic, readonly, weak) id <DCValueConverter> converter;
..
@end
@bhargavms
Copy link
Contributor

I don't get it why should that reference be weak again?

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