CMPT 383 Study Guide - Final Guide: Thread Safety, Concurrent Computing, Immutable Object
Document Summary
Very error prone: programmer must be 100% accurate on something very hard to notice when testing. Languages that don"t require manual management ususaly have some way to manually delete a heap object. Eliminates the programmer overheard of managing memory. But comes with some runtime overhead in the language: will slow code down a little. There are several gc algorithms. E. g. every language except c. c++, and sometimes o, objective c. A mutable object is one that can be modified after its initial creation: e. g. java, list list = new. Arraylist (): list. add(6), most oo languages have mutable objects: internal state can be modified by change instance variables. Integer i new integer (6); I = new integer (7); But mutable objects are often easiesr to work with: e. g. can add to collection without rebuilding, e. g. state of a game. C can pass & store references to funcitons.