Shall we use 'free' to free memory assigned by new, What are
the further consequences??
Answer Posted / nishikant sahu
Yes you can but not recommend, b'c some time when you class
hold the heap memory it can't be free by "Free" b'c of no
constructor call happening via "Free" and you get the memory
leak. so use New/ delete or malloc/free pair.
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Can static member variables be private?
What are the advantages of using typedef in a program?
How do I make turbo c++ full screen?
Is c++ proprietary?
Comment on assignment operator in c++.
Explain all the C++ concepts using examples.
What is an overflow error?
Can we specify variable field width in a scanf() format string? If possible how?
What is the difference between equal to (==) and assignment operator (=)?
What are c++ manipulators?
Who discovered c++?
What is conditions when using boolean operators?
Which is the best c++ compiler?
What is public, protected, private in c++?
How compile and run c++ program in turbo c++?