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

Is c++ slower than c?

1030


How do you sort a sort function in c++ to sort in descending order?

985


Explain "const" reference arguments in function?

1049


What do you know about near, far and huge pointer?

1136


Which is better c++ or java?

976


How a macro differs from a template?

1166


If dog is a friend of boy and boy is a friend of house, is dog a friend of house?

997


program explaining feautures of c++

2431


Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()

1529


What do you mean by function pointer?

1102


Difference between a copy constructor and an assignment operator.

997


which operator is used for performing an exponential operation a) > b) ^ c) none

1058


Reverse the Linked List. Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL

798


Differentiate between a copy constructor and an overloaded assignment operator.

1072


What are stacks?

1054