aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/gpr/spinlock_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/gpr/spinlock_test.cc')
-rw-r--r--test/core/gpr/spinlock_test.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/core/gpr/spinlock_test.cc b/test/core/gpr/spinlock_test.cc
index ac9f70f301..0ee72edb15 100644
--- a/test/core/gpr/spinlock_test.cc
+++ b/test/core/gpr/spinlock_test.cc
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <new>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -69,7 +68,7 @@ static void test_destroy(struct test* m) {
static void test_create_threads(struct test* m, void (*body)(void* arg)) {
int i;
for (i = 0; i != m->thread_count; i++) {
- new (&m->threads[i]) grpc_core::Thread("grpc_create_threads", body, m);
+ m->threads[i] = grpc_core::Thread("grpc_create_threads", body, m);
m->threads[i].Start();
}
}
@@ -79,7 +78,6 @@ static void test_wait(struct test* m) {
int i;
for (i = 0; i != m->thread_count; i++) {
m->threads[i].Join();
- m->threads[i].~Thread();
}
}