From f1c33b8ec5e9f4352512d3caf8643068d8e44320 Mon Sep 17 00:00:00 2001 From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz> Date: Mon, 16 Jun 2014 23:24:58 +0200 Subject: [PATCH] fix memory leaks --- alib2/src/alphabet/Symbol.cpp | 2 +- alib2/src/label/Label.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alib2/src/alphabet/Symbol.cpp b/alib2/src/alphabet/Symbol.cpp index 1f6c50f741..42eb5f2b6d 100644 --- a/alib2/src/alphabet/Symbol.cpp +++ b/alib2/src/alphabet/Symbol.cpp @@ -21,7 +21,7 @@ Symbol::Symbol(const Symbol& other) : symbol(other.getSymbol().clone()) { } -Symbol::Symbol(Symbol&& other) noexcept : symbol(std::move(other.getSymbol()).plunder()) { +Symbol::Symbol(Symbol&& other) noexcept : symbol(other.symbol) { other.symbol = NULL; } diff --git a/alib2/src/label/Label.cpp b/alib2/src/label/Label.cpp index f0988de7d0..c54a821e43 100644 --- a/alib2/src/label/Label.cpp +++ b/alib2/src/label/Label.cpp @@ -21,7 +21,7 @@ Label::Label(const Label& other) : label(other.getLabel().clone()) { } -Label::Label(Label&& other) noexcept : label(std::move(other.getLabel()).plunder()) { +Label::Label(Label&& other) noexcept : label(other.label) { other.label = NULL; } -- GitLab