Re: malloc in obj-c/cocoa
Re: malloc in obj-c/cocoa
- Subject: Re: malloc in obj-c/cocoa
- From: Ben Dougall <email@hidden>
- Date: Fri, 6 Feb 2004 23:01:25 +0000
On Friday, February 6, 2004, at 09:40 pm, John Randolph wrote:
On Feb 6, 2004, at 1:14 PM, Ben Dougall wrote:
the method that's alloc'ing an NSMutableString there, has a pointer
passed to it when called, that points to some memory i previously
malloc'ed. but that actual NSMutableString creation does not actually
make use of that pointer. it's almost as if my previous malloc is
messing with cocoa's use of malloc? or am i making that up?
Let's see what you're trying to pass to NSMutableString.
it's the method that contains the NSMutableString creation that has
something passed to it, not the NSMutableString. when i alloc & init
the string nothing is passed to it:
NSMutableString *str = [[NSMutableString alloc] init];
the method that that string creation is near the start of, gets the
probably problematic malloc'd by me pointer passed to in one of the
arguments, but is not used in the NSMutableString creation. later on in
the method there's numerous appendString's to 'str' but those appends
occur after the alloc, and from that backtrace it's the alloc that
causing the crash right? i think so.
thanks, ben.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.