Model Bundle
bundle.h
@interface Bundle : ARBase
@property(readwrite, assign) NSString *name, *ordering, *id;
@end
@interface Bundle (Accessors)
-(NSArray *) sheets;
@end
bundle.m
# import "Bundle.h"
@implementation Bundle
@dynamic name, ordering, id;
+ (void)initialize
{
[[self relationships] addObject:[ARRelationshipHasMany relationshipWithName:@"sheets"]];
}
@end
Model Sheet
sheet.h
@interface Sheet : ARBase
@property(readwrite, assign) NSString *name, *id, *bundleId;
@end
sheet.m
# import "sheet.h"
@implementation Sheet
@dynamic name, id, bundleId;
@end
===How to reproduce===
get all bundles [Bundle findAll]
Run instruments and select profile leaks. a lot of NSCFString
objects show up in the leaks. If however we remove the has many
relationships, the leaks disappear.