From 5b5a642ef6e09bc4b97608c246f3cdf52147b8e4 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 2 Sep 2008 02:53:08 +0000 Subject: [PATCH] Monotone-Parent: efd9ade13655768d4cae7605de1142d71a2b3e0c Monotone-Revision: 5391b9be06e00255b931f3a5c6535e3527ebd405 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-02T02:53:08 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoObject.m | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79e2151a9..ba30454ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-09-01 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoObject.m ([SOGoObject + -initWithName:_nameinContainer:_container]): we no longer retain + the context, to avoid making a circular reference. + * SoObjects/SOGo/SOGoUser.m ([SOGoUser -initWithLogin:newLoginroles:newRoles]): moved the core from init here. diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index 2e8e526fe..580efdc11 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -270,7 +270,6 @@ SEL SOGoSelectorForPropertySetter (NSString *property) if ((self = [self init])) { context = [[WOApplication application] context]; - [context retain]; nameInContainer = [_name copy]; container = _container; if ([self doesRetainContainer]) @@ -285,7 +284,6 @@ SEL SOGoSelectorForPropertySetter (NSString *property) - (void) dealloc { - [context release]; [owner release]; if ([self doesRetainContainer]) [container release]; @@ -402,7 +400,7 @@ SEL SOGoSelectorForPropertySetter (NSString *property) { obj = [[self soClass] lookupKey: lookupName inContext: localContext]; if (obj) - [obj bindToObject: self inContext: localContext]; + obj = [obj bindToObject: self inContext: localContext]; } if (obj)