Finding
Severity: MAJOR
Section: 14
Evidence: include/transport/nats_connection.hpp:302-303
Principle: POLA
fetch() returns a raw natsMsg* that the caller must destroy via natsMsg_Destroy(). This is an unsafe ownership transfer pattern in modern C++. A std::unique_ptr<natsMsg, decltype(&natsMsg_Destroy)> with natsMsg_Destroy as the deleter would make ownership explicit and prevent leaks. Raw pointer return in a C++20 codebase is a POLA violation.
Part of #504
Finding
Severity: MAJOR
Section: 14
Evidence: include/transport/nats_connection.hpp:302-303
Principle: POLA
fetch() returns a raw natsMsg* that the caller must destroy via natsMsg_Destroy(). This is an unsafe ownership transfer pattern in modern C++. A std::unique_ptr<natsMsg, decltype(&natsMsg_Destroy)> with natsMsg_Destroy as the deleter would make ownership explicit and prevent leaks. Raw pointer return in a C++20 codebase is a POLA violation.
Part of #504