previous up next print clean
Next: Multiple Inheritance Up: C++ DIFFICULTIES Previous: C++ DIFFICULTIES

Garbage collection

HCL objects, such as vectors, consume computer resources, particularly memory. During the execution of a program, C++ burdens the programmer with freeing these resources. If a programmer does not free a certain resource, after it outlived its usefulness, the resource will not be available to him until the program exits. Since in an object-oriented language, the allocation of resources and the dependencies between objects can be hidden, garbage collection by the programmer is error prone and potentially wasteful.

The lack of garbage collection is a tremendous complication in the HCL framework. For example, several vectors may be members of the same vector space. If the vector space object consumes a significant amount of resources (for example the header values of an irregular data set), we may want all vectors to refer to a single vector space copy. The programmer has to ensure that no vector is referring to that vector space anymore before she can deallocate the vector space.


previous up next print clean
Next: Multiple Inheritance Up: C++ DIFFICULTIES Previous: C++ DIFFICULTIES
Stanford Exploration Project
11/11/1997