gotok
gotok

Reputation: 77

IOS Memory Leak Analysis

I added the following code to my app:

AVAudioSession *audioSession = [AVAudioSession sharedInstance];

NSError *setCategoryError = nil;
BOOL success = [audioSession setCategory:AVAudioSessionCategoryPlayback error:&setCategoryError];

Before adding this code, I got no leaks when running the xCode Instruments Leaks tool. With this code added, I get a leak: Leaked Object: _NSCFString, Address: 0x5572e0, Size: 32 bytes, Responsible Library: AudioToolBox, Responsible Frame: AudioSessionGetProperty.

The code lines were plucked from IOS Library sample code. Any advice on what is wrong and what I need to do to fix it?

thanks....

Upvotes: 0

Views: 946

Answers (1)

Costique
Costique

Reputation: 23722

There are no leaks in the code you posted. There may be leaks in Apple frameworks, though, but you cannot do anything about them. Most likely, it's a false positive reported by the Leaks instrument.

Upvotes: 1

Related Questions