Skip to content

Commit

Permalink
fix(Buffer): pass by ref
Browse files Browse the repository at this point in the history
  • Loading branch information
mcakircali committed Sep 5, 2024
1 parent 9e669dc commit 6abe199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/eckit/io/Buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static char* allocate(const size_t size) {
return size == 0 ? nullptr : new char[size];
}

static void deallocate(const char* buffer) {
static void deallocate(char*& buffer) {
delete[] buffer;
buffer = nullptr;
}
Expand Down

0 comments on commit 6abe199

Please sign in to comment.