Data Structures and Algorithms
with Object-Oriented Design Patterns in JavaA Java program that does not create any object instances or arrays does not create garbage. Similarly, a program that creates all the objects it needs at the beginning of its execution and uses the same objects until it terminates also does not create garbage. By reducing the number of objects a program creates dynamically during its execution, we can reduce or even eliminate the need for garbage collection.
Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.