mirror of
https://github.com/MariaDB/server.git
synced 2025-08-31 22:22:30 +03:00
ndb - fix small memory leak
ndb/include/util/Vector.hpp: fix small memory leak ndb/src/mgmapi/mgmapi.cpp: fix small memory leak
This commit is contained in:
@@ -61,6 +61,10 @@ Vector<T>::Vector(int i){
|
||||
template<class T>
|
||||
Vector<T>::~Vector(){
|
||||
delete[] m_items;
|
||||
// safety for placement new usage
|
||||
m_items = 0;
|
||||
m_size = 0;
|
||||
m_arraySize = 0;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
@@ -174,6 +178,10 @@ MutexVector<T>::MutexVector(int i){
|
||||
template<class T>
|
||||
MutexVector<T>::~MutexVector(){
|
||||
delete[] m_items;
|
||||
// safety for placement new usage
|
||||
m_items = 0;
|
||||
m_size = 0;
|
||||
m_arraySize = 0;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
Reference in New Issue
Block a user