The normal implementation of String is a class with 3 fields:
class String
field int max_length;
field int current_length;
field Array data; // character data
constructor String new(int maxLength) allocates the String object based on the number of fields, so all instances of String have fixed size = 3.
The
data Array is a separate allocation of size
maxLength.
String.dispose() needs to deallocate the
data Array and then deallocate itself.
--Mark