A method in which to allocate memory
for your object
s (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++
as the operator
int *DynamicIntPtr = new int;
int *DynamicArray = new int;
Integer integerRef = new Integer(3);
int intArray = new int;
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.