• 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: checking for line ending types
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking for line ending types


  • Subject: Re: checking for line ending types
  • From: Graham J Lee <email@hidden>
  • Date: Sat, 27 Nov 2004 17:57:22 +0000

On 27 Nov 2004, at 17:43, Craig Hunter wrote:

Hi All,


Hi Craig,

char *check_file_type(const char *file_name)
{
  if (atoi([Gstring cString]) == 0) return NULL;
  else if (atoi([Gstring cString]) == 1) return "Mac";
  else return "DOS";


Your function has definitely returned by here, so the next lines don't get run...


  [Gstring release];
  [Gpipe release];
  [theGrep release];
}


I *think* that calling [object autorelease] on these is possibly what you want to do, or you could just -release them before you do any returning.


Cheers,

Graham.
--
Graham Lee
UNIX Systems Manager,
Oxford Physics Practical Course
http://nextstep.sdf-eu.org

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >checking for line ending types (From: Craig Hunter <email@hidden>)

  • Prev by Date: checking for line ending types
  • Next by Date: Re: C/C++ > Obj-C porting
  • Previous by thread: checking for line ending types
  • Next by thread: Re: checking for line ending types
  • Index(es):
    • Date
    • Thread