Hi All,

Thanks so much to Micheal, Volker, and esp. to Ken for the pointer/object 
refresher.

I think my mistake came from thinking that NSString's initWithString method did 
memory allocation as well, and would create a new object in one swell foop. ;-) 
 From my own trials and failures, and from what you all are saying - this is 
definitely not the case.

> However, why are you attempting to init another object, at
> all?  The expression [[files objectAtIndex:i]
> stringByStandardizingPath] returns a pointer to a string
> object, already.  There's a pretty good chance that you
> can just make use of that string object directly.  If
> you need to keep it around, you could retain it and then
> release it later.

This is the approach I tried, and it seems to satisfy my requirement of having 
the file name available internally to other routines.  I have now encountered 
other problems further downstream in my pipeline, but c'est la vie ...

Again, thanks all - very, very much!

cheers
vinai



      
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to