mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +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 );
|
||||
}
|
||||
|
||||
static void FreeVector( Vector<FlameGraphItem>& data )
|
||||
{
|
||||
for( auto& v : data )
|
||||
{
|
||||
FreeVector( v.children );
|
||||
v.children.~Vector();
|
||||
}
|
||||
}
|
||||
|
||||
struct FlameGraphContext
|
||||
{
|
||||
ImDrawList* draw;
|
||||
@ -217,6 +226,7 @@ void View::DrawFlameGraph()
|
||||
ImGui::EndChild();
|
||||
|
||||
ImGui::End();
|
||||
FreeVector( data );
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user