Hello Everyone,
I am stuck from past 3 days for fixing the memory leaks.
I have modified the SpeakHere application only for playing a (mp3) song. When i did launch this application using the Instrument I observed the memory leaks when the playing starts and playing stops.
I have added following in setUpAudioQueueBuffer() to support .mp3 playback.
bool isFormatVBR=(self.audioFormat.mBytesPerPacket == 0 || self.audioFormat.mFramesPerPacket == 0);
if(isFormatVBR)
{
packetDescriptions = (AudioStreamPacketDescription*)malloc(numPacketsToRead * sizeof(AudioStreamPacketDescription));
}
else
{
packetDescriptions=NULL;
}
I have freed packetDescriptions in dealloc() of AudioPlayer.m.
I have also freed audioLevel in AudioQueObject's dealloc.
But still I observed memory leaks. It is showing the memory leak in playbackCallback() as GeneralBolck-1024, generalblock-208 etc.
Any help regarding this problem is highly appreciable.
Thanks
Sameera
I am stuck from past 3 days for fixing the memory leaks.
I have modified the SpeakHere application only for playing a (mp3) song. When i did launch this application using the Instrument I observed the memory leaks when the playing starts and playing stops.
I have added following in setUpAudioQueueBuffer() to support .mp3 playback.
bool isFormatVBR=(self.audioFormat.mBytesPerPacket == 0 || self.audioFormat.mFramesPerPacket == 0);
if(isFormatVBR)
{
packetDescriptions = (AudioStreamPacketDescription*)malloc(numPacketsToRead * sizeof(AudioStreamPacketDescription));
}
else
{
packetDescriptions=NULL;
}
I have freed packetDescriptions in dealloc() of AudioPlayer.m.
I have also freed audioLevel in AudioQueObject's dealloc.
But still I observed memory leaks. It is showing the memory leak in playbackCallback() as GeneralBolck-1024, generalblock-208 etc.
Any help regarding this problem is highly appreciable.
Thanks
Sameera