From 293c899cd4c7df1654f682ccf1f505c08a4db67c Mon Sep 17 00:00:00 2001 From: Alex Samuel Date: Sun, 9 Apr 2023 14:55:51 -0400 Subject: [PATCH] Add missing ctor. --- cxx/include/ora/lib/string_builder.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cxx/include/ora/lib/string_builder.hh b/cxx/include/ora/lib/string_builder.hh index 781c2d2..a43d9ce 100644 --- a/cxx/include/ora/lib/string_builder.hh +++ b/cxx/include/ora/lib/string_builder.hh @@ -27,6 +27,12 @@ public: operator char const*() const { return buffer_; } std::string str() const { return std::string(buffer_, length_); } + ~StringBuilder() + { + if (buffer_ != nullptr) + free(buffer_); + } + StringBuilder& operator<<( char c)