thorvg/inc
Hermet Park 0394fa5ef5 common: fix a potential memory leak after clear()
Paints must clear canvas engine data if they were dismissed from the canvas,

1. Canvas::clear(free = false) must retain all the paints from the paints hierarchy
so that user keeps the all dangled paints lifecycle.
In this scenario, it could leak the engine data of paints, this patch fixes it.

2. Previously, t just keeps the immediate paints lives of canvas, but not them of children of scene nor picture.
This patch changes a policy which was not considered seriously,
Now it keeps the all paints lives through the tree-hieararchy.

3. Also changed the Scene::clear() behavior identical to Canvas::clear() for consistency.

@API Modification:

From: Result Scene::clear() noexcept;
To: Result Scene::clear(bool free = true) noexcept;
2021-05-28 16:19:01 +09:00
..
meson.build capi: support c interfaces 2020-07-15 16:00:09 +09:00
thorvg.h common: fix a potential memory leak after clear() 2021-05-28 16:19:01 +09:00
thorvg_capi.h common: fix a potential memory leak after clear() 2021-05-28 16:19:01 +09:00