Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix iOS SoundEngine memory leak #2802

Merged
merged 3 commits into from

2 participants

@admsyn
Collaborator

Prolonging the life of SoundEngine just a little farther :)

This sorts out the PR #2770 conflict and closes #2745

@admsyn admsyn merged commit bb9b543 into from
@admsyn admsyn deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 22, 2014
  1. @danoli3

    SoundEngine Fix for ofxiOS leaking memory #2745

    danoli3 authored
    Fix as proposed by @rraallvv #2745
Commits on Feb 9, 2014
  1. @admsyn

    Merge branch 'iOS-SoundEngine-MemoryLeakFix' of git://github.com/dano…

    admsyn authored
    …li3/openFrameworks into danoli3-iOS-SoundEngine-MemoryLeakFix
  2. @admsyn
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 3 deletions.
  1. +4 −3 addons/ofxiOS/src/sound/SoundEngine.cpp
View
7 addons/ofxiOS/src/sound/SoundEngine.cpp
@@ -1083,12 +1083,13 @@ class OpenALObject
OSStatus UnloadEffect(UInt32 inEffectID)
{
- mEffectsMap->Remove(inEffectID); //remove pointer from structure first
- SoundEngineEffect *theEffect = mEffectsMap->Get(inEffectID); //then delete
+ SoundEngineEffect *theEffect = mEffectsMap->Get(inEffectID);
if (theEffect){
delete theEffect;
+ theEffect = NULL;
}
- return 0;
+ mEffectsMap->Remove(inEffectID);
+ return AL_NO_ERROR;
}
bool checkToRelease(ALuint sourceID, int mSource)
Something went wrong with that request. Please try again.