• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Leaks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leaks


  • Subject: Re: Leaks
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 4 Oct 2004 11:14:17 -0700


On Oct 4, 2004, at 11:11, Doug Wyatt wrote:

On Oct 3, 2004, at 4:26, Mark's Studio wrote:
Im having some leaks :(

What is the best way to track them down ?

do i need to free anything other than what i've allocated memory for ?

SpectrumAU::~SpectrumAU()
{
	if(IsInitialized()){

    free(gSourceBufferL);
	free(gSourceBufferR);
	free(spectrumAudioBufferList);
    }
}

Mark Poirier was right; IsInitialized() is the wrong test.

A more robust way to code this pattern is to ensure the pointers are initialized to NULL in your constructor, then free them in the destructor when they are non-NULL.

Doug


_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Leaks
      • From: William Stewart <email@hidden>
References: 
 >Leaks (From: "Mark's Studio" <email@hidden>)

  • Prev by Date: Problem under auval but not in host(s)
  • Next by Date: Re: Parameter Value Strings and CF retain/release issues
  • Previous by thread: Re: Leaks
  • Next by thread: Re: Leaks
  • Index(es):
    • Date
    • Thread