Skip to content

Commit

Permalink
Remove exception from empty_allocator::deallocate()
Browse files Browse the repository at this point in the history
The data copy will call deallocate no matter what, so be graceful.
We will still catch cases where we try to allocate through
the empty allocator.

Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Nov 13, 2024
1 parent 151de3a commit 1f9ebab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ttg/ttg/parsec/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace detail {
}

void deallocate(value_type* ptr, std::size_t size) {
throw std::runtime_error("Deallocate on empty allocator!");
/* nothing to be done; will be called from ~data_copy_type() */
}
};

Expand Down

0 comments on commit 1f9ebab

Please sign in to comment.