answersLogoWhite

0

No, you have to use the operator delete to objects created by new.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What do you mean by run time memory allocation?

When the allocation of memory to the program is done on need, during the execution of a program, it is called as the dynamic memory allocation. Memory is allocated from a free memory pool called as heap.The only way to access this dynamically allocated memory is through pointers. Dynamically allocated memory can be freed at run time and again added to heap.


How system knows what range of memory it has allocated while using free?

use free() how does the system know what range of memory it has allocated use free() how does the system know what range of memory it has allocated


71 Which function should be used to free the memory allocated by calloc?

free() is a function used to free the memory allocated dynamically ,by both malloc and calloc functions. free(ptr): ptr is a pointer to a memory block which has already been creeated by malloc or calloc.


Which function should be used to free the memory allocated by calloc?

Use the free function to release memory that was previously allocated by malloc, calloc or realloc.


Function used to free memory allocated by malloc?

The free() function.


Max memory allocated by malloc in c?

Memory is allocated by malloc from the heap.... so max mem = size of heap that is free...


With every use of memory allocation function should be used to release allocated memory which is no longer needed?

free()


What is dynamic mamory?

Dynamic memory refers to memory that is allocated and deallocated during program execution, as opposed to static memory which is allocated at compile time. In C and C++, dynamic memory allocation is done using functions like malloc() and free(), allowing for flexibility in managing memory resources at runtime. However, improper use of dynamic memory can lead to memory leaks or segmentation faults.


Who has been freed from slavery in Mesopotamia?

it is called free man


What will happen if you allocate memory using new and free it using free or allocate sing calloc and free it using delete?

The C++ new uses malloc internally to allocate memory and the C++ delete uses free internally to revoke memory. However, they are not interchangeable and so memory allocated with new MUST be revoked with delete. If you mix them up, you will have a memory leak! Haya.


What is the 5 letter word that means to have been set free?

Freed.


What is the use of realloc in c program?

Increase or decrease the size of the allocated memory. (Note: functionality of malloc and free can be achieved with realloc, too.)