CS 3304: Comparative Languages
Names and Binding
[
Course Documents
] : [
Names and Binding
]
Previous
Contents
Next
Keyword Index
Explicit Heap-Dynamic Lifetime
Allocated and deallocated by explicit directives, specified by the programmer, which take effect during execution
Referenced only through pointers or references
Examples:
Dynamic objects in C++ (via new and delete)
All objects in Java
Advantage:
Provides for dynamic storage management
Explicit control
Disadvantage:
Potential for human error