No. Don't get confused with this. When you append an item to a collection in such a way, or assign it to a variable, it gets copied. (Its copy constructor or operator= gets called.) Eg. Code: MyClass item; //creating a new item item.stuff = 42; MyClass item2 = item; //behind the scenes, item2 copies item item.stuff = 8; //this line doesn't change item2
MyClass item; //creating a new item item.stuff = 42; MyClass item2 = item; //behind the scenes, item2 copies item item.stuff = 8; //this line doesn't change item2