#16 new
Udit Sajjanhar

NSCFString Memory Leak caused by HasMany Relationship

Reported by Udit Sajjanhar | October 12th, 2011 @ 11:01 AM

Model Bundle


@interface Bundle : ARBase
@property(readwrite, assign) NSString *name, *ordering, *id;


@interface Bundle (Accessors)
    -(NSArray *) sheets;


# import "Bundle.h"

@implementation Bundle
@dynamic name, ordering, id;

+ (void)initialize
    [[self relationships] addObject:[ARRelationshipHasMany relationshipWithName:@"sheets"]];

Model Sheet

@interface Sheet : ARBase
    @property(readwrite, assign) NSString *name, *id, *bundleId;


# import "sheet.h"

@implementation Sheet
    @dynamic name, id, bundleId;

===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.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

ActiveRecord is an insanely easy to use database framework written in objective-c It's obviously "inspired" by (copying) the infamous ActiveRecord that comes with Rails(http://rubyonrails.org) But it tries to be more versatile when it comes to working with multiple connections.

People watching this ticket