Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commitfa1a9b5a698bbc0d282697cbc6e57f11a8ba687f (patch)
Author
 Stoycho Kyosev <stoycho.kk@gmail.com>
2022-11-06 19:24:47 +0200
Committer
 Stoycho Kyosev <stoycho.kk@gmail.com>
2022-11-06 19:24:47 +0200
Files01fd0050cff58cc55dea7a10db7f5c57c689d839
Data-structures-and-algorithms-fa1a9b5a698bbc0d282697cbc6e57f11a8ba687f.tar
Data-structures-and-algorithms-fa1a9b5a698bbc0d282697cbc6e57f11a8ba687f.tar.gz
Data-structures-and-algorithms-fa1a9b5a698bbc0d282697cbc6e57f11a8ba687f.zip
Parent8b97246a36150dd7ea408ae16b7e9a696d5be91d (diff)
Fix mem leak
1 files changed, 1 insertions, 0 deletions
-rw-r--r--Seminar05/LinkedList.hpp1
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;