Improve Clear(). NFC.

Was getting segfaults near here with another patch since removed from the branch.
Moving these assignments after the memfree means they still have
useful data when debugging a crash in memfree.
This commit is contained in:
Ryan Pavlik 2019-05-23 12:27:54 -05:00 committed by whitequark
parent b9d035c805
commit 610e35f6dd

View File

@ -533,9 +533,9 @@ public:
elem[i].Clear();
elem[i].~T();
}
elemsAllocated = n = 0;
if(elem) MemFree(elem);
elem = NULL;
elemsAllocated = n = 0;
}
};