Revision: 3281
http://skim-app.svn.sourceforge.net/skim-app/?rev=3281&view=rev
Author: hofman
Date: 2007-11-29 10:05:26 -0800 (Thu, 29 Nov 2007)
Log Message:
-----------
Fix a leak and remove a KVO observer.
Modified Paths:
--------------
trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m
Modified:
trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m
2007-11-29 17:08:00 UTC (rev 3280)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControlContainer.m
2007-11-29 18:05:26 UTC (rev 3281)
@@ -38,6 +38,10 @@
}
- (void) dealloc {
+ unsigned int i;
+ for(i=0; i < [remoteControls count]; i++) {
+ [[remoteControls objectAtIndex: i] removeObserver: self
forKeyPath:@"listeningToRemote"];
+ }
[self stopListening: self];
[remoteControls release];
[super dealloc];
@@ -48,6 +52,7 @@
if (remoteControl) {
[remoteControls addObject: remoteControl];
[remoteControl addObserver: self
forKeyPath:@"listeningToRemote" options:NSKeyValueObservingOptionNew
context:nil];
+ [remoteControl release];
return YES;
}
return NO;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit