mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
fix(Any): set pHolder to nullptr in destruct()
This commit is contained in:
parent
b380b57d5d
commit
bc8704f44e
@ -152,9 +152,16 @@ private:
|
||||
if (!isEmpty())
|
||||
{
|
||||
if (!isLocal())
|
||||
delete pHolder;
|
||||
{
|
||||
auto* h { pHolder };
|
||||
pHolder = nullptr;
|
||||
delete h;
|
||||
}
|
||||
else
|
||||
reinterpret_cast<PlaceholderT*>(holder)->~PlaceholderT();
|
||||
{
|
||||
auto* h { reinterpret_cast<PlaceholderT*>(holder) };
|
||||
h->~PlaceholderT();
|
||||
}
|
||||
|
||||
if (clear) std::memset(holder, 0, sizeof(holder));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user