From cb43292ca02b70aba5b4e911ee4538ae7f431c3a Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Mon, 30 Jan 2012 14:35:50 +0100 Subject: [PATCH] Remove the roster delegate if it gets deallocated. Maybe it's not a good idea altogether to add/remove the roster automatically? --- src/XMPPRoster.m | 2 +- tests/test.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/XMPPRoster.m b/src/XMPPRoster.m index 54c9315..37c5f57 100644 --- a/src/XMPPRoster.m +++ b/src/XMPPRoster.m @@ -56,12 +56,12 @@ - (void)dealloc { + [connection removeDelegate: self]; [rosterItems release]; [super dealloc]; } - - (OFDictionary*)rosterItems { return [[rosterItems copy] autorelease]; diff --git a/tests/test.m b/tests/test.m index 5668a48..561d793 100644 --- a/tests/test.m +++ b/tests/test.m @@ -39,7 +39,7 @@ #endif { - XMPPConnection * conn; + XMPPConnection *conn; XMPPRoster *roster; } @end