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...

In a class, there is a reference or pointer of an object of
another class embedded, and the memory is either allocated
or assigned to the new object created for this class. In
the constructor, parameters are passed to initialize the
data members and the embedded object reference to get
inialized. What measures or design change should be advised
for proper destruction and avioding memory leaks, getting
pointers dangling for the embedded object memory
allocation? Please suggest.

Answer Posted / shanthila

use copy constructors

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is vector a class in c++?

1049


Why is c++ awesome?

1033


What kind of jobs can I get with c++?

1116


What is the maximum combined length of command line arguments including the space between adjacent arguments?

1000


What operator is used to access a struct through a pointer a) >> b) -> c) *

1122


Can I have a reference as a data member of a class? If yes, then how do I initialise it?

1230


Is c++ a good beginners programming language?

1075


Explain what you mean by a pointer.

1104


Define private, protected and public access control.

1123


What is object oriented programming (oop)?

1116


Why is standard template library used?

1056


How can we access protected and private members of a class?

1120


What is the difference between the functions rand(), random(), srand() and randomize()?

1292


Explain the virtual inheritance in c++.

1068


What is virtual base class uses?

1359