Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


classes and multiple assignments in Swift 2.0...

I understand the difference between pass by value and pass by reference. What seems like a bad idea is the example given in the video of creating a new instance of a class and then creating a new variable assignment equal to the new instance eg:

var phoneClass = ProductClass(arguments) var bigPhoneClass = phoneClass

It seems like doing this would cause disaster in more complex projects due to the difficulty of clearly tracking what is modifying memory. What circumstances would provide a justification for this?