mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
sw_engine renderer: fix a memory leak.
disposed of task memory properly, detected by Memory Sanitizer.
This commit is contained in:
parent
2b77522d5f
commit
921bd94b6f
1 changed files with 2 additions and 1 deletions
|
@ -457,7 +457,8 @@ bool SwRenderer::postRender()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto task = tasks.data; task < tasks.end(); ++task) {
|
for (auto task = tasks.data; task < tasks.end(); ++task) {
|
||||||
(*task)->pushed = false;
|
if ((*task)->disposed) delete(*task);
|
||||||
|
else (*task)->pushed = false;
|
||||||
}
|
}
|
||||||
tasks.clear();
|
tasks.clear();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue