K
K
Krypt2015-04-27 20:59:35
Objective-C
Krypt, 2015-04-27 20:59:35

Does this reading of the property threaten me with side effects: self-> _property?

My knowledge suggests that it is not, but skepticism about strange code requires verification. According to the logic of things, it should behave like a call by name _property, with the only difference. that self->_property is visible to inheritors.
.h

@interface MessagesDataRetriever : PagedDataRetriever
@property (nonatomic, strong) id property;
- (id) test;
@end

.m
@implementation
- (id) test
{
    return self->_property;
}
@end

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question