Quote Originally Posted by veer_elluri
1) How to control the Memory leaks in C++
Use RAII. Learn about different types of smart pointers and use them wherever preferably over raw pointers (whenever you allocate a pointer with "new"). Prefer std::vector to arrays and std::string to char *.

You can also use smart-pointers and RAII to control resource leaks. These can occur when there is a matching "close" function to be called after an "open" function.
2) How to Determine the function is a virtual function in the class(not using virtual key word)
You can look in the header of its base class (all the way up the hierarchy). You must have those header files.

Another alternative (not as good) is to write a class derived from that class and attempt to call the function through polymorphism. See if it calls your overload or the base-class version.

3) When do we over ride the Copy constructor.
Normally you need to overload the default copy-constructor when a member-by-member copy is not the desired behaviour. This will often happen if your class contains a member pointer (even a smart pointer) and you actually want a copy to produce a "clone" of the pointer, i.e. a copy of the object it points to rather than another pointer to the same object. (It is better to use a COW smart-pointer though which removes the need to overload in this case).

Whenever you need to overload the default copy-constructor, you usually need to overload the destructor and the operator=() (assignment). You can disable copy-construction and assignment by declaring them in the private section of your class. (No implementation necessary).
4) does memory and size is assigned to the 'this' operator?
I don't quite understand the question but you can do sizeof( *this ). If "this" is a pointer to a base class, I think sizeof( *this ) will give you the size of the base class not the derived class, i.e. it's not a polymorphic operation.
5) What is the main Difference between destructor and virtual destructor?
A virtual destructor will pass through the hierarchy, deleting all derived classes before deleting itself. Note that unlike other virtual functions, all the destructors are called (with the most derived class first). No other virtual functions can be called from the destructor.