A method in which to
allocate memory for your
objects (we're talking
computer programming here, people) in a
dynamic nature, usually off the
heap. This allows conditional creation of objects.
Its utilization is of particular use in the implementation of linked lists, i/o buffers, and various complex node maps.
Implemented in C as malloc(), realloc(), calloc(), and various other derivitives:
int *dynamic_int_ptr = (int*)malloc(sizeof(int));
int *dynamic_array = (int*)malloc(sizeof(int)*100);
Implemented in
C++ and
Java as the
operator "
new":
C++:
int *DynamicIntPtr = new int;
int *DynamicArray = new int[100];
Java:
Integer integerRef = new Integer(3);
int intArray = new int[100];
In many HLLs (High Level Languages), most or all memory is dynamically allocated, and usually freed through a scheme of garbage collection or reference counting.