Destroy XMLReader object attached to Reader one when this one is gone as to avoid
potential memory leaks.
This commit is contained in:
committed by
wmayer
parent
dda591ec6e
commit
e20456dc1f
@@ -563,6 +563,12 @@ Base::Reader::Reader(std::istream& str, const std::string& name, int version)
|
||||
{
|
||||
}
|
||||
|
||||
Base::Reader::~Reader()
|
||||
{
|
||||
if ( this->localreader != nullptr )
|
||||
delete this->localreader;
|
||||
}
|
||||
|
||||
std::string Base::Reader::getFileName() const
|
||||
{
|
||||
return this->_name;
|
||||
|
||||
@@ -295,6 +295,7 @@ class BaseExport Reader : public std::istream
|
||||
{
|
||||
public:
|
||||
Reader(std::istream&, const std::string&, int version);
|
||||
~Reader();
|
||||
std::istream& getStream();
|
||||
std::string getFileName() const;
|
||||
int getFileVersion() const;
|
||||
|
||||
Reference in New Issue
Block a user