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
Why do we need pointers?
What is the importance of mutable keyword?
Tell me can a pure virtual function have an implementation?
What are separators in c++?
Explain rtti.
What is cout flush?
What is a stack? How it can be implemented?
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
Explain the isa and hasa class relationships.
Where are setjmp and longjmp used in c++?
What is a storage class? Mention the storage classes in c++.
What is static in c++?
List the types of polymorphism in c++?
What is the object serialization?
What is constructor c++?