I'd understand why you'd think that. But whats actually happening is it's creating that local object, changing it, then when it goes to return it, it makes a copy and returns that.
Although thats the process, the compiler should optimise this so the copy never takes place.