• 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: Leak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leak?


  • Subject: Re: Leak?
  • From: Marc Poirier <email@hidden>
  • Date: Thu, 22 Jul 2004 15:53:36 -0400

Looking at that code, I see a number of other odd things as well:

1) Why go to the extra step of creating an FSRef? Why not just do:
CFURLRef fileURL = CFURLCreateWithBytes(kCFAllocatorDefault, (const UInt8*)filePath, strlen(filePath), kCFStringEncodingUTF8, NULL);

2) Whichever means are used to create the CFURL, the result should still be checked for nullness and return null from the function if the result is null.

3) Why cast the CFURLRef to CFURLRef in the call to CFURLCreateDataAndPropertiesFromResource?

I guess I should just consolidate all of these and file a bug report...

Marc



On Jul 22, 2004, at 3:26 PM, William Stewart wrote:

Yes, good catch... it should be released.

Bill

On 22/07/2004, at 11:04 AM, Steven Woolgar wrote:

I'm looking at auprocess.cpp in
/Developer/Examples/CoreAudio/Services/AudioFileTools
and noticed that in the ReadPresetFromPresetFile function a CFURLRef
is created
and never released.

This appears to create a leak of a CFURLRef. Is this a bug, has it
been fixed,
and I'm looking at old code, or what?




Woolie
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


References: 
 >Leak? (From: Steven Woolgar <email@hidden>)
 >Re: Leak? (From: William Stewart <email@hidden>)

  • Prev by Date: Re: Leak?
  • Next by Date: Re: 48Khz Stream reported as 44.1KHz
  • Previous by thread: Re: Leak?
  • Next by thread: Distorted Audio Playback in 10.2.3?
  • Index(es):
    • Date
    • Thread