Re: help with closing file handle
Re: help with closing file handle
- Subject: Re: help with closing file handle
- From: Uli Kusterer <email@hidden>
- Date: Sat, 9 Feb 2008 15:55:39 +0100
On 09.02.2008, at 13:14, Daniel Luis dos Santos wrote:
I have found the solution to the problem. It seems that I have to
pass a mutable string with the path to the file handle's factory
method. Looking back at the output of the error, now it seems pretty
obvious.
That should not be necessary. If it says NSString*, it should be
allowed to be any NSString*, there's no reason why it would need to be
a particular subclass of NSString*. I guess you'll have to post your
code if you want us to be able to help you more. You must be doing
something else wrong, maybe releasing an object too early (this can
happen indirectly by passing an autoreleased object somewhere where it
will be accessed after it has been released), or otherwise screwing up
memory.
If you're not clear about memory management, you may want to read
the docs on memory management in Cocoa someone else already posted, or
my article on memory management in general:
<http://www.zathras.de/howmemorymanagementworks.htm>
which is not Cocoa-specific, but starts from the very bottom. There's
also a follow-up (part of my C tutorial) that expands on that and
illustrates a few of the things that can go wrong when managing memory
the wrong way by giving an example:
<http://www.zathras.de/angelweb/masters-of-the-void-book6.htm>
If you already knew all that, maybe it'll help someone lurking here.
Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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