answersLogoWhite

0

No, C++ does not use dynamic memory management. The programmer is entirely responsible for releasing dynamic memory when it is no longer required. When static objects fall from scope, their destructors are called automatically, but there is no automatic garbage collection for dynamic objects. Allocated memory remains allocated until the programmer manually releases it, or the thread that owns the memory is terminated.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Stack can be described as a pointer Explain?

Stack is also dynamic memory, without the hassle. Dynamic memory uses pointers to check its value, free the memory, etc.


What is segmented page allocation?

Segmented page allocation is a type of memory management that uses base and bound registers to determine memory faults, similar to dynamic page allocation. More importantly it is different to dynamic page allocation since the entire process doesn't have to be in memory, similar to using virtual memory paging where the program is broken into pieces. Unlike virtual memory paging, the maximum virtual memory size is limited to the size of physical memory.


When a class uses dynamic memory what member function should be provided by class?

the copy constructor


RAM uses static memory or dynamic memory?

Well, it can be either. There is DRAM (Dynamic random access memory) and SRAM (Static random access memory). DRAM is a much more simple and inexpensive type of memory, it only requires one transistor and capacitor per bit where as SRAM requires four transistors. However, SRAM is faster and uses much less power.


Explian the term memory hierachy?

This is the memory structure which the memory management layer uses to organise and separate different sets of instructions.


What is sd ram memory?

Synchronous dynamic random access memory (in other words fast access memory that the computer uses for the operating system/kernal, and running programs)


A C program using dynamic memory allocation to sort n names in ascending order?

Writing a C program that uses dynamic memory allocation to sort names in ascending order is a typical computer science assignment. To write this program, you must be in UNIX.


Disadvantage of Dynamic RAM over Static RAM?

Advantages: 1.Low power. 2.Static. 3.Faster. 4.Used in cache memory. Disadvantages: 1. Reliability is less. 2. uses more transistors per bit of memory. 3. More expensive.


What must happen tp a program that is stored on hard drve be fore it can be executed?

It must be loaded into memory. Then, if it uses dynamic binding, it must be bound to its imported symbols.


What controls the memory?

Memory in a computer system is controlled by the memory management unit (MMU), which is responsible for allocating and managing memory resources. The operating system uses the MMU to track and organize memory usage, ensuring that different processes and applications are allocated the appropriate amount of memory needed to function efficiently.


What is difference between direct addressing and indirect addressing in c plus plus?

Indirect addressing uses a pointer. Indirectly accessing the memory being pointed at is known as dereferencing. Direct addressing uses a variable's name or a reference to obtain the value.


How do you find size of any object in java OR is there any operator or fun.. equivalent size of in c plus plus?

No, there is no such operator or function in Java that can tell you the amount of memory an object uses.