In
computer science, dynamic memory allocation is the allocation of
memory storage for use in a
computer program during the
runtime of that program. It is a way of distributing ownership of limited memory resources among many pieces of data and code. Importantly, the amount of memory allocated is determined by the program at the time of allocation and need not be known in advance. A dynamic allocation exists until it is explicitly released, either by the programmer or by a
garbage collector; this is notably different from
automatic and
static memory allocation, which require advance knowledge of the required amount of memory and have a fixed duration. It is said that an object so allocated has dynamic lifetime.
See more at Wikipedia.org...