#5015 libecl : Make sure *.UNSMRY is closed properly after data is read

Earlier attempts to fix this caused major performance issues. Now closing the file stream when reading of vector data is completed, seems to work as expected.
This commit is contained in:
Magne Sjaastad 2019-11-08 11:12:06 +01:00
parent 4c9048cd6a
commit 157219e63d

View File

@ -65,6 +65,10 @@ std::vector<double> unsmry_loader::get_vector(int pos) const {
data[index] = *data_value;
}
int_vector_free( index_map );
if (ecl_file_view_flags_set(file_view, ECL_FILE_CLOSE_STREAM))
ecl_file_view_fclose_stream(file_view);
return data;
}