Skip to content

Commit

Permalink
Add missing ctor.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhsamuel committed Apr 9, 2023
1 parent 47087e6 commit 293c899
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cxx/include/ora/lib/string_builder.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 293c899

Please sign in to comment.