• 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: Trouble using createFileAtPath method to create file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble using createFileAtPath method to create file


  • Subject: Re: Trouble using createFileAtPath method to create file
  • From: "Jaime Rios" <email@hidden>
  • Date: Mon, 15 Oct 2007 11:15:16 -0400

Oh, and thanks for the memory leak tip!

--
-Jaime
http://www.jaimerios.com


On 10/15/07, Jaime Rios <email@hidden> wrote:
>
> Yes, the "Cleanup At Startup" folder exists prior to me trying to create
> the file.
>
>
> --
> -Jaime
> http://www.jaimerios.com
>
> On 10/12/07, Emanuele ∞ Vulcano <email@hidden> wrote:
> >
> >
> > Il giorno 12/ott/07, alle ore 16:27, Jaime Rios ha scritto:
> >
> > > NSString* pFP = [(NSString*)CFURLCopyPath(sourcePath)
> > > stringByAppendingPathComponent:
> > >         (NSString*)fileName];
> >
> > This is bad because it will leak a string. Core Foundation does not
> > follow the same rules as Cocoa; in particular *Copy* functions work
> > like Cocoa's init methods.
> >
> > More correct:
> >
> > NSString* pFPPrefix = [(NSString*) CFURLCopyPath(sourcePath)
> > autorelease];
> > NSString* pFP = [pFPPrefix stringByAppending...];
> >
> > Back to your original problem: does the folder whose path is pFP
> > actually *exist* before you try to create a file in it?
> >
> >   - ∞
> >
> >
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Trouble using createFileAtPath method to create file (From: "Jaime Rios" <email@hidden>)
 >Re: Trouble using createFileAtPath method to create file (From: glenn andreas <email@hidden>)
 >Re: Trouble using createFileAtPath method to create file (From: "Jaime Rios" <email@hidden>)
 >Re: Trouble using createFileAtPath method to create file (From: "Jaime Rios" <email@hidden>)

  • Prev by Date: Re: Trouble using createFileAtPath method to create file
  • Next by Date: Moving An NSTableView From One View To Another
  • Previous by thread: Re: Trouble using createFileAtPath method to create file
  • Next by thread: Memory leaks when running an apple event
  • Index(es):
    • Date
    • Thread