Re: Leaks
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>) |