WSL/SLF GitLab Repository
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
snow-models
meteoio
Commits
23ecf565
Commit
23ecf565
authored
May 08, 2014
by
Thomas Egger
Browse files
GRIBIO: Fixing memory leak
parent
999f298c
Changes
1
Hide whitespace changes
Inline
Side-by-side
meteoio/plugins/GRIBIO.cc
View file @
23ecf565
...
@@ -752,14 +752,19 @@ void GRIBIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
...
@@ -752,14 +752,19 @@ void GRIBIO::readMeteoData(const Date& dateStart, const Date& dateEnd,
//find index of first time step
//find index of first time step
size_t
idx_start
;
size_t
idx_start
;
bool
start_found
=
false
;
bool
start_found
=
false
;
for
(
idx_start
=
0
;
idx_start
<
cache_meteo_files
.
size
();
idx_start
++
)
{
for
(
idx_start
=
0
;
idx_start
<
cache_meteo_files
.
size
();
idx_start
++
)
{
if
(
dateStart
<
cache_meteo_files
[
idx_start
].
first
)
{
if
(
dateStart
<
cache_meteo_files
[
idx_start
].
first
)
{
start_found
=
true
;
start_found
=
true
;
break
;
break
;
}
}
}
}
if
(
start_found
==
false
)
return
;
if
(
idx_start
>
0
)
idx_start
--
;
//start with first element before dateStart (useful for resampling)
if
(
start_found
==
false
)
{
free
(
lats
);
free
(
lons
);
return
;
}
if
(
idx_start
>
0
)
idx_start
--
;
//start with first element before dateStart (useful for resampling)
try
{
try
{
for
(
size_t
ii
=
idx_start
;
ii
<
cache_meteo_files
.
size
();
ii
++
)
{
for
(
size_t
ii
=
idx_start
;
ii
<
cache_meteo_files
.
size
();
ii
++
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment