Getting a QoS from an entity is akin to reading, and all read/take operations reuse or free/reallocate memory to avoid memory leaks, and so it is a reasonable assumption that calling dds_get_qos repeatedly without intervening calls to dds_reset_qos would not leak any memory either. (This was actually an assumption in the builtin topics test.) Therefore, it is reasonable to first call dds_reset_qos in dds_get_qos. All operations in the API that yield or modify a QoS object result in a properly initialised one, therefore the input to dds_get_qos is necessarily initialised, and so this is safe. Signed-off-by: Erik Boasson <eb@ilities.com> |
||
|---|---|---|
| .. | ||
| cmake | ||
| core | ||
| docs | ||
| etc | ||
| examples | ||
| idlc | ||
| os | ||
| scripts | ||
| tools | ||
| util | ||
| CMakeLists.txt | ||