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

Why #include is used?

1112


What is type of 'this' pointer? Explain when it is get created?

1064


Which function cannot be overloaded c++?

1161


What is using namespace std in cpp?

1241


How do I run c++?

1117


Explain how we implement exception handling in c++?

1102


What is the use of this pointer in c++?

1049


Write about the members that a derived class can add?

1024


What can I use instead of namespace std?

1201


Difference between class and structure.

1218


Which bit wise operator is suitable for turning off a particular bit in a number?

1160


why and when we can declar member fuction as a private in the class?

2133


Can you overload the operator+ for short integers?

1082


Give 10 points of differences between C & C++.

1184


What is abstraction in c++?

1421