Commit c0b41dc5 authored by Alexis Lebis's avatar Alexis Lebis

Fix memory leak.

Answers issue #14
parent 1ab427af
......@@ -27,11 +27,12 @@ class MagnitudeException : public std::exception
virtual ~MagnitudeException() throw()
{
//this->_triedValue must not be freed by ~this !
delete(this->_triedValue);
}
Magnitude & getMagnitude() const {return *(this->_triedValue);}
};
#endif // SRC_EXCEPTION_MAGNITUDE_EXCEPTION_H_
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment