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

Write about the members that a derived class can add?

934


Can I make ios apps with c++?

988


How do you compile the source code with your compiler?

1002


Explain the difference between class and struct in c++?

985


Do vectors start at 0 c++?

979


Explain how overloading takes place in c++?

971


How do you differentiate between overloading the prefix and postfix increments?

1040


What is the standard template library (stl)?

1612


What is abstraction c++?

947


What is the size of a vector?

1060


What is late binding c++?

926


What is fflush c++?

952


Array base access faster or pointer base access is faster?

2239


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

1018


What are punctuators in c++?

1088