mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-05 15:09:31 +03:00
Merge pull request #708 from devnexen/new_placement_tests
c++ override test new placement operator
This commit is contained in:
commit
2141e414a7
1 changed files with 5 additions and 1 deletions
|
@ -97,6 +97,10 @@ static void various_tests() {
|
||||||
delete t;
|
delete t;
|
||||||
t = new (std::nothrow) Test(42);
|
t = new (std::nothrow) Test(42);
|
||||||
delete t;
|
delete t;
|
||||||
|
auto tbuf = new unsigned char[sizeof(Test)];
|
||||||
|
t = new (tbuf) Test(42);
|
||||||
|
t->~Test();
|
||||||
|
delete tbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Static {
|
class Static {
|
||||||
|
|
Loading…
Add table
Reference in a new issue