Remove core-comm dependency through CounterManager/timex in core/oam subsystem. Basic...
[anna.git] / include / anna / diameter / codec / Message.hpp
index 874752b..7600b6e 100644 (file)
@@ -202,9 +202,12 @@ public:
   * Destructor
   */
   ~Message();
-  // Si hago virtual al destructor, al destruir una hija se llama tambien al destructor del padre.
-  // No hace falta porque he hecho virtual a 'clear' que se llama desde el destructor.
-
+  // Virtual destructors are useful when you can delete an instance of a derived class through a pointer to base class:
+  // This destructor is not virtual, then a pointer to base class (even pointing to a children one) will invoke this destructor, not the derived one.
+  // My current solution: virtualizing method 'clear'
+  //
+  // Recommendation:
+  // To sum up, always make base classes' destructors virtual when they're meant to be manipulated polymorphically.
 
   // setters