views:

27

answers:

0

I'm wondering if there's a difference between

NSFileManager *fileManager = [NSFileManager defaultManager];
[fileManager doStuff]; //doStuff is not a real method.
[fileManager doOtherStuff];

and

[[NSFileManager defaultManager] doStuff];
[[NSFileManager defaultManager] doOtherStuff];

In speed / memory footprint / everything else that is applicable.

But only if I need the variable more than once, otherwise I could just go with the nested one. I know if there's a difference that it will be small but I'd still like to know, even if the difference is microscopic.