Skip to content
Snippets Groups Projects
Commit 35f181ba authored by nkindlon's avatar nkindlon
Browse files

Fixed small memory leak in InputStreamMgr.

parent b8d8856c
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,10 @@ InputStreamMgr::~InputStreamMgr() { ...@@ -57,6 +57,10 @@ InputStreamMgr::~InputStreamMgr() {
delete _bgStream; delete _bgStream;
_bgStream = NULL; _bgStream = NULL;
} }
if (_finalInputStream != NULL) {
delete _finalInputStream;
_finalInputStream = NULL;
}
} }
bool InputStreamMgr::init() bool InputStreamMgr::init()
...@@ -225,7 +229,7 @@ void InputStreamMgr::reset() ...@@ -225,7 +229,7 @@ void InputStreamMgr::reset()
} }
if (!_isStdin) { if (!_isStdin) {
//For file input, just re-open the file. //For file input, just re-open the file.
_oldInputStream = _finalInputStream; delete _finalInputStream;
_finalInputStream = new ifstream(_filename.c_str()); _finalInputStream = new ifstream(_filename.c_str());
} else { } else {
if (_isBgzipped) { if (_isBgzipped) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment