Commit 473a80c3 authored by Matthieu Dorier's avatar Matthieu Dorier

corrected problem with destructor

parent 9bf1c393
......@@ -127,6 +127,7 @@ class pool {
static void u_free(ABT_unit* u) {
auto uu = static_cast<U*>(*u);
uu->~U();
unit_allocator.deallocate(uu, 1);
*u = nullptr;
}
......@@ -172,6 +173,7 @@ class pool {
void* data;
int ret = ABT_pool_get_data(p, &data);
auto impl = static_cast<P*>(data);
impl->~P();
pool_allocator.deallocate(impl, 1);
}
};
......
......@@ -91,6 +91,7 @@ class scheduler {
void* data;
ABT_sched_get_data(s, &data);
S* impl = static_cast<S*>(data);
impl->~S();
scheduler_allocator.deallocate(impl,1);
}
......
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