mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-11 23:21:55 +00:00
svg_loader: memory properly released
delete->free
This commit is contained in:
parent
56e2498466
commit
f3450e1760
1 changed files with 2 additions and 1 deletions
|
@ -2981,7 +2981,8 @@ bool SvgLoader::close()
|
|||
}
|
||||
auto gradients = loaderData.gradients.data;
|
||||
for (size_t i = 0; i < loaderData.gradients.count; ++i) {
|
||||
delete(*gradients);
|
||||
(*gradients)->clear();
|
||||
free(*gradients);
|
||||
++gradients;
|
||||
}
|
||||
loaderData.gradients.reset();
|
||||
|
|
Loading…
Add table
Reference in a new issue