Beginners question regarding NSFileHandle
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