YahooSocialSdk Obj-C Framework: Full of memory leaks?
The YahooSocialSdk Obj-C Framework is not garbage-collected. (In its Target settings, "Objective-C Garbage Collection" in the target is "Unsupported").
Classes in this framework declare retained properties and synthesize them in the normal Apple way, except that there are no dealloc methods anywhere in the project. I have copied out the relevant code for one of the tens of properties used in this project. Does the following code leak memory, or is there possibly some trick Yahoo! is using because Yahoo! is smarter than me? I skipped WWDC 2008 and 2009.
@interface YOSSession : NSObject {
@protected
NSString *applicationId;
....
}
@property (nonatomic, readwrite, retain) NSString *applicationId;
...
@end
@implementation YOSSession
// Weird: This class does not have a -dealloc implementation.
@synthesize applicationId;
- (id)initWithApplicationId:(NSString *)anApplicationId
{
if(self = [self init])
{
[self setApplicationId:anApplicationId];
}
return self;
}
...
@end
I suppose Yahoo! could be doing something Really Weird like releasing 'applicationID' in another class, but I searched the project and don't see anything like that happening. It looks to me like a major memory leak, and this idiom appears to be used throughout the project.
by
1 Reply