fix: unexpected crash

An unexpected crash caused by an unconnected exit.
This commit is contained in:
木头云 2021-08-23 13:10:03 +08:00 committed by GitHub
parent df3cf1b4c4
commit d80bea9b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,6 +94,7 @@ inline void free(void* p, std::size_t size) {
template <typename T>
void free(T* p) {
if (p == nullptr) return;
destruct(p);
pool_alloc::free(p, sizeof(T));
}