Skip to content
This repository has been archived by the owner on Jul 2, 2019. It is now read-only.

Commit

Permalink
Fix memory leak caused by monitoring app switching
Browse files Browse the repository at this point in the history
The code that monitors app switching, relinquishing control
of the media keys to another process in its white list, was
causing a huge memory leak. Instead of fixing it, I decided
it wasn't a feature I wanted to support. This change simply
comments out the feature and fixes the memory problem.
  • Loading branch information
shayne committed Nov 6, 2011
1 parent 82f0326 commit 81a049a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PianoKeys/SPMediaKey/SPMediaKeyTap.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ @implementation SPMediaKeyTap
-(id)initWithDelegate:(id)delegate;
{
_delegate = delegate;
[self startWatchingAppSwitching];
// This was leaking memory like a sieve
// [self startWatchingAppSwitching];
singleton = self;
_mediaKeyAppList = [NSMutableArray new];
return self;
Expand Down

0 comments on commit 81a049a

Please sign in to comment.