Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

Answer Posted / guest

Yes we can use free which was assigned by new.but in this
case no destrctor will be called as free doesn't call this.
So it is recommended that we should not use free if we
allcoate the memory using new.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the scope of resolution operator.

233


Explain the difference between c++ and java.

222


What is == in programming?

226


What is a c++ map?

191


What is enum c++?

193






What c++ library is string in?

197


What is a memory leak c++?

204


Show the declaration for a pointer to function returning long and taking an integer parameter.

217


Explain the problem with overriding functions

209


Should I learn c or c++ first?

209


How to give an alternate name to a namespace?

220


What does override mean in c++?

192


How do I use arrays in c++?

210


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

224


Explain how an exception handler is defined and invoked in a Program.

224