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

When can I use a forward declaration?

1110


What is searching?

1137


Why ctype h is used in c++?

963


Where and why do I have to put the "template" and "typename" keywords?

1057


What are abstract data types in c++?

990


What is the most common mistake on c++ and oo projects?

985


What is exception handling? Does c++ support exception handling?

1040


What is virtual base class uses?

1368


Which bitwise operator is used to check whether a particular bit is on or off?

1070


What is &x in c++?

1008


Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

1467


What is a syntax in c++?

1170


What are the advantages of prototyping?

1065


Is c++ a programming language?

1091


What are the basic data types used in c++?

1046