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

Beginners question regarding NSFileHandle


  • Subject: Beginners question regarding NSFileHandle
  • From: "Roger Gilliar" <email@hidden>
  • Date: Mon, 6 Aug 2001 21:13:57 +0200

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


  • Follow-Ups:
    • Re: Beginners question regarding NSFileHandle
      • From: Finlay Dobbie <email@hidden>
    • Re: Beginners question regarding NSFileHandle
      • From: "John C. Randolph" <email@hidden>
    • Re: Beginners question regarding NSFileHandle
      • From: "R. Tony Goold" <email@hidden>
    • RE: Beginners question regarding NSFileHandle
      • From: "Adam Knight" <email@hidden>
  • Prev by Date: [ANN] Vermont Recipes 4 pdf files delayed
  • Next by Date: NSNotification vs message callback?
  • Previous by thread: [ANN] Vermont Recipes 4 pdf files delayed
  • Next by thread: RE: Beginners question regarding NSFileHandle
  • Index(es):
    • Date
    • Thread