Shall we use 'free' to free memory assigned by new, What are
the further consequences??

Answer Posted / uma sankar pradhan

No,we shouldnot use 'free' to free memory assigned by new.
It causes memory leak and sometimes hanging of the system

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between new and malloc?

718


What is a multimap c++?

775


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

707


Is swift better than c++?

630


Explain the term memory alignment?

789






Describe the setting up of my member functions to avoid overriding by the derived class?

700


Is linux written in c or c++?

664


What causes a runtime error c++?

695


Explain what are mutator methods in c++?

673


What is microsoft c++ redistributable?

699


What is pure virtual function?

718


What do you mean by overhead in c++?

681


What are c++ storage classes?

706


What does it mean to declare a member function as virtual?

667


Show the declaration for a static member variable.

610