[NSWI080] Middleware Assignment 2
Vlastimil Dort
dort at d3s.mff.cuni.cz
Fri Mar 27 15:23:45 CET 2020
Dear students,
In reaction to questions some of you had about the second assignment:
1) Servant destruction
The C++11 mapping say lessĀ than the old C++ mapping about destruction
of servants that are no longer needed. In the old mapping, the servants
keep an internal reference count, while in the new mapping, the type
CORBA::servant_traits<T>::ref_type behaves like std::shared_ptr.
Keep in mind that when an object is activated, the POA will keep
additional reference(s) to the servant. In order to allow the servant to
be destroyed, it has to be deactivated first (using poa->deactivate_object).
2) Valgrind
If you use the Valgrind tool, you may encounter some values or messages
reported, which are related to the ORB implementation rather than your
code. This tool may be helpful for diagnosing memory problems, but
cannot tell you if your code is correct or not, and you have to use your
judgement in interpreting the output.
Vlastimil Dort
More information about the NSWI080
mailing list