Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How the endl and setw manipulator works?

968


What is microsoft c++ redistributable?

1030


Differentiate between late binding and early binding. What are the advantages of early binding?

975


What is searching? Explain linear and binary search.

948


Why is "using namespace std;" considered bad practice?

1041


What is a dangling pointer in c++?

1091


How does code-bloating occur in c++?

1139


How much do c++ programmers make?

1059


What is the use of 'using' declaration in c++?

1094


If there are two catch statements, one for base and one for derived, which should come first?

993


What is scope operator in c++?

1041


Can a Structure contain a Pointer to itself?

1070


What is the protected keyword used for?

1063


Is rust better than c++?

1063


Explain the register storage classes in c++.

1146