mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-07-09 06:19:19 +00:00
Prevent dangling pointer
This commit is contained in:
@ -40,7 +40,7 @@ public:
|
||||
~String()
|
||||
{
|
||||
strdbg("String deleted: \"%s\" (data: %#lx, length: %d, capacity: %d)", this->m_Data, this->m_Data, this->m_Length, this->m_Capacity);
|
||||
delete[] this->m_Data;
|
||||
delete[] this->m_Data, this->m_Data = nullptr;
|
||||
}
|
||||
|
||||
int length() const
|
||||
|
Reference in New Issue
Block a user