• 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: Beginners question regarding NSFileHandle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Beginners question regarding NSFileHandle


  • Subject: RE: Beginners question regarding NSFileHandle
  • From: "Adam Knight" <email@hidden>
  • Date: Mon, 6 Aug 2001 15:41:11 -0500

Completely wild guess:

NSFileHandle fh;
fh = [[NSFileHandle alloc] init];

blah blah blah

I'm at work in Windows, but the last time I had that problem with an object it
was because this Perl hacker forgot that C objects need to be explititly
allocated and initialized and you cannot release what you do not have. =)
--
____________________________________________________________________________
Adam Knight
______________________________Codito, ergo sum______________________________

> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of Roger Gilliar
> Sent: Monday, August 06, 2001 2:14 PM
> To: email@hidden
> Subject: Beginners question regarding NSFileHandle
>
>
> I have the following code, that causes a signal 10 (SIGBUS) error:
> {
> id fh;
>
> fh = [NSFileHandle fileHandleForReadingAtPath:@"/private/tmp/test"];
> if (fh == nil) {
> // do something
> }
> else {
> [fh readDataOfLength:3];
> [fh closeFile];
> [fh release];
> };
>
> }
>
> As soon as I leave '[fh release]' in the code I get the signal 10 error. Why
> ?
>
> BTW: Is it possible to use the NSFileHandle type for fh instead of the
> generic id type ?
>
> Regards
> Roger
> _______________________________________________
> cocoa-dev mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Beginners question regarding NSFileHandle (From: "Roger Gilliar" <email@hidden>)

  • Prev by Date: NSNotification vs message callback?
  • Next by Date: Terminal.app and Opaqueness - HOW?
  • Previous by thread: Beginners question regarding NSFileHandle
  • Next by thread: Re: Beginners question regarding NSFileHandle
  • Index(es):
    • Date
    • Thread