diff options
Fix mem leak
1 files changed, 1 insertions, 0 deletions
| -rw-r--r-- | Seminar05/LinkedList.hpp | 1 |
diff --git a/Seminar05/LinkedList.hpp b/Seminar05/LinkedList.hpp index fc74b21..4f12000 100644 --- a/Seminar05/LinkedList.hpp +++ b/Seminar05/LinkedList.hpp @@ -198,6 +198,7 @@ LinkedList<T>& LinkedList<T>::operator=(const LinkedList<T>& other) { template<class T> LinkedList<T>& LinkedList<T>::operator=(LinkedList<T>&& other) { if(this != &other) { + free(); move(other); } return *this; |
