Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Retain cycle causes ARBase and ARRelationship leaks

#10

ARBase retains its relationships but each relationship also retains its parent 'record' creating a retain cycle.

Change the record property of ARRelationship to a weak reference (c.f. delegates).


diff --git a/Source/Relationships/ARRelationship.h b/Source/Relationships/ARRelationship.h
index 04f9753..6d8d73c 100755
--- a/Source/Relationships/ARRelationship.h
+++ b/Source/Relationships/ARRelationship.h
@@ -51,7 +51,7 @@
   ARBase *record;
 }
 @property(readwrite, retain) NSString *name, *className;
-@property(readwrite, retain) ARBase *record;
+@property(readwrite, assign) ARBase *record;
 
 /*!
  * Creates a relationship with a given name using the passed class

Reported by Robin Summerhill · February 13th, 2009 @ 08:39 AM

State: new
Milestone: none
Assigned to: Fjölnir Ásgeirsson Fjölnir Ásgeirsson

Activity

No comments yet.

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.