mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Fix memory leak.
This commit is contained in:
parent
4afc0960fb
commit
6080b8742a
@ -90,6 +90,15 @@ static void SortFlameGraph( Vector<FlameGraphItem>& data )
|
|||||||
for( auto& v : data ) SortFlameGraph( v.children );
|
for( auto& v : data ) SortFlameGraph( v.children );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void FreeVector( Vector<FlameGraphItem>& data )
|
||||||
|
{
|
||||||
|
for( auto& v : data )
|
||||||
|
{
|
||||||
|
FreeVector( v.children );
|
||||||
|
v.children.~Vector();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
struct FlameGraphContext
|
struct FlameGraphContext
|
||||||
{
|
{
|
||||||
ImDrawList* draw;
|
ImDrawList* draw;
|
||||||
@ -217,6 +226,7 @@ void View::DrawFlameGraph()
|
|||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
FreeVector( data );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user