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 / mms zubeir

Sorry, there is an error in my above answer. In the first
statement, it is container class, not contained class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How important is c++?

934


When should overload new operator on a global basis or a class basis?

1043


What is #include iomanip?

963


Explain the concept of copy constructor?

998


What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h

1019


What is different in C++, compare with unix?

1030


Explain public, protected, private in c++?

975


What is vector pair in c++?

1189


Are there interfaces in c++?

958


How does class accomplish data hiding in c++?

1139


Write about the members that a derived class can add?

944


Why do we use classes in programming?

1001


Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

2166


What is a wchar_t in c++?

1080


How did c++ start?

1053