FROM : Jason Stephenson
DATE : Fri Jul 04 02:22:10 2008
Chris Paveglio wrote:
> Thanks all for your help and insight! I believe Jason's solution will
> work for me as I am changing the assignment of what "theSetting" is
> each time through the loop. I have a list (array) of files that gets
> copied from one place to the other, and I change the origin and the
> destination each time in the loop. Also Michael I understand now what
> you are saying about the assignment. Thank you for putting it in a
> nice detailed explanation! :-)
Just keep in mind that you'll be leaking memory with my example if you
use it as written. I'm assuming that you'll do something with the string
inside the loop. After doing whatever it is you do with it, you'll need
to release theSettings. Making a mutable copy does allocate memory for
the copy.
DATE : Fri Jul 04 02:22:10 2008
Chris Paveglio wrote:
> Thanks all for your help and insight! I believe Jason's solution will
> work for me as I am changing the assignment of what "theSetting" is
> each time through the loop. I have a list (array) of files that gets
> copied from one place to the other, and I change the origin and the
> destination each time in the loop. Also Michael I understand now what
> you are saying about the assignment. Thank you for putting it in a
> nice detailed explanation! :-)
Just keep in mind that you'll be leaking memory with my example if you
use it as written. I'm assuming that you'll do something with the string
inside the loop. After doing whatever it is you do with it, you'll need
to release theSettings. Making a mutable copy does allocate memory for
the copy.






Cocoa mail archive

