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

Explain the difference between static and dynamic binding of functions?

1066


What is the difference between public, private, and protected access?

1063


How would you use the functions randomize() and random()?

1071


What are the unique features of C++.

1073


Is swift faster than c++?

1017


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

1029


Explain the differences between list x; & list x();.

1005


What is the real purpose of class – to export data?

1106


Does c++ have arraylist?

1013


Is it possible to write a c++ template to check for a function's existence?

1026


explain the reference variable in c++?

1057


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

1167


Explain terminate() and unexpected() function?

1096


Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened

1559


Explain how overloading takes place in c++?

1039