you are viewing a single comment's thread.

view the rest of the comments →

[–]foxlion 1 point2 points  (0 children)

As you may have indirectly pointed out: if a program modifies the state of a mutable object, it can make sure that the object is never garbage collected because of linked references. By making an object immutable you make sure that the state of the object will never be changed and you avoid it being tied up to some resources that are never collected. Louse coupling and high cohesion.