Minor adjustments to the profiling tools code

This commit is contained in:
Wojciech Figat
2022-12-07 15:27:40 +01:00
parent f426c75696
commit 3017010ef4
6 changed files with 13 additions and 7 deletions

View File

@@ -205,7 +205,6 @@ namespace FlaxEditor.Windows.Profiler
/// <inheritdoc /> /// <inheritdoc />
public override void OnDestroy() public override void OnDestroy()
{ {
Clear();
_timelineLabelsCache?.Clear(); _timelineLabelsCache?.Clear();
_timelineEventsCache?.Clear(); _timelineEventsCache?.Clear();
_tableRowsCache?.Clear(); _tableRowsCache?.Clear();

View File

@@ -166,7 +166,6 @@ namespace FlaxEditor.Windows.Profiler
/// <inheritdoc /> /// <inheritdoc />
public override void OnDestroy() public override void OnDestroy()
{ {
Clear();
_timelineEventsCache?.Clear(); _timelineEventsCache?.Clear();
_tableRowsCache?.Clear(); _tableRowsCache?.Clear();

View File

@@ -83,6 +83,14 @@ namespace FlaxEditor.Windows.Profiler
{ {
} }
/// <inheritdoc />
public override void OnDestroy()
{
Clear();
base.OnDestroy();
}
/// <summary> /// <summary>
/// Initializes this instance. /// Initializes this instance.
/// </summary> /// </summary>

View File

@@ -22,7 +22,7 @@ public:
/// <summary> /// <summary>
/// Represents single CPU profiling event data. /// Represents single CPU profiling event data.
/// </summary> /// </summary>
API_STRUCT() struct Event API_STRUCT(NoDefault) struct Event
{ {
DECLARE_SCRIPTING_TYPE_MINIMAL(Event); DECLARE_SCRIPTING_TYPE_MINIMAL(Event);

View File

@@ -24,7 +24,7 @@ public:
/// <summary> /// <summary>
/// Represents single CPU profiling event data. /// Represents single CPU profiling event data.
/// </summary> /// </summary>
API_STRUCT() struct Event API_STRUCT(NoDefault) struct Event
{ {
DECLARE_SCRIPTING_TYPE_MINIMAL(Event); DECLARE_SCRIPTING_TYPE_MINIMAL(Event);

View File

@@ -19,7 +19,7 @@ public:
/// <summary> /// <summary>
/// The GPU memory stats. /// The GPU memory stats.
/// </summary> /// </summary>
API_STRUCT() struct MemoryStatsGPU API_STRUCT(NoDefault) struct MemoryStatsGPU
{ {
DECLARE_SCRIPTING_TYPE_MINIMAL(MemoryStatsGPU); DECLARE_SCRIPTING_TYPE_MINIMAL(MemoryStatsGPU);
@@ -37,7 +37,7 @@ public:
/// <summary> /// <summary>
/// Engine profiling data header. Contains main info and stats. /// Engine profiling data header. Contains main info and stats.
/// </summary> /// </summary>
API_STRUCT() struct MainStats API_STRUCT(NoDefault) struct MainStats
{ {
DECLARE_SCRIPTING_TYPE_MINIMAL(MainStats); DECLARE_SCRIPTING_TYPE_MINIMAL(MainStats);
@@ -90,7 +90,7 @@ public:
/// <summary> /// <summary>
/// The CPU thread stats. /// The CPU thread stats.
/// </summary> /// </summary>
API_STRUCT() struct ThreadStats API_STRUCT(NoDefault) struct ThreadStats
{ {
DECLARE_SCRIPTING_TYPE_MINIMAL(ThreadStats); DECLARE_SCRIPTING_TYPE_MINIMAL(ThreadStats);