diff --git a/ashura/std/lambda.h b/ashura/std/lambda.h index df06cc86..ba2f5810 100644 --- a/ashura/std/lambda.h +++ b/ashura/std/lambda.h @@ -48,7 +48,7 @@ struct Lambda if (dst_mem == nullptr) [[unlikely]] { - src->~T(); + obj::destruct(Span{src, 1}); } else { diff --git a/ashura/std/super.h b/ashura/std/super.h index 667d21d1..4f817200 100644 --- a/ashura/std/super.h +++ b/ashura/std/super.h @@ -32,7 +32,7 @@ struct Super if (dst_mem == nullptr) [[unlikely]] { - src->~T(); + obj::destruct(Span{src, 1}); } else {