Why isn’t this object being passed by reference when assigning something else to it?

If you are familiar with pointers, that’s an analogy you can take. You’re actually passing a pointer, so obj.someProperty would dereference to that property and actually override that, while merely overriding obj would kill off the pointer and not overwrite the object.

Leave a Comment