Commit 75007dda by Aaron Gokaslan Committed by GitHub

chore: rule of 3 for strdup guard (#3905)

parent 9bc27044
......@@ -312,6 +312,10 @@ protected:
// along the way.
class strdup_guard {
public:
strdup_guard() = default;
strdup_guard(const strdup_guard &) = delete;
strdup_guard &operator=(const strdup_guard &) = delete;
~strdup_guard() {
for (auto *s : strings) {
std::free(s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment