Wakaama uses structs a lot. But because C lacks constructors and destructors, a lot of boilerplate code just allocates/inits/deinits/frees those structs in various success and error code paths.
The use of proper classes with constructors/destructors solves object lifetime tracking.
The use of unique_ptr, shared_ptr reduces explicit destructor requirements
The use of string_view (C++ backport, use of C++14 native if available) / string instead of raw const char* pointers make it obvious which string are owned by a structure
Wakaama uses structs a lot. But because C lacks constructors and destructors, a lot of boilerplate code just allocates/inits/deinits/frees those structs in various success and error code paths.
See https://github.com/martinmoene/string-view-lite