发现了位于Native堆上严重的内存泄露
This commit is contained in:
@@ -278,9 +278,8 @@ namespace Demo.Game
|
||||
|
||||
private bool IsScrollTimeline = false;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public ProfilerMarker s_PreparePerfMarkerForSetSongCurrentTime = new(nameof(GameController) + "RuntimeForSetSongCurrentTime");
|
||||
public ProfilerMarker s_PreparePerfMarker = new(nameof(GameController) + "Runtime");
|
||||
#endif
|
||||
|
||||
private void Update()
|
||||
{
|
||||
@@ -294,15 +293,15 @@ namespace Demo.Game
|
||||
// TODO : 修正这个逻辑,这个逻辑是反常的
|
||||
if (MainAudio.IsPlaying())
|
||||
{
|
||||
s_PreparePerfMarkerForSetSongCurrentTime.Begin();
|
||||
SetSongCurrentTime(CurrentTime);
|
||||
s_PreparePerfMarkerForSetSongCurrentTime.End();
|
||||
MainObject.ScriptUpdate(CurrentTime, deltaTime, ScriptableObject.TickType.Update);
|
||||
}
|
||||
if (IsMain == false)
|
||||
return;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
s_PreparePerfMarker.Begin(this);
|
||||
#endif
|
||||
#if UNITY_EDITOR
|
||||
if (Keyboard.current[Key.LeftShift].isPressed)
|
||||
#else
|
||||
@@ -349,9 +348,7 @@ namespace Demo.Game
|
||||
}
|
||||
}
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
s_PreparePerfMarker.End();
|
||||
#endif
|
||||
}
|
||||
|
||||
public IEnumerator GameExit()
|
||||
|
||||
Reference in New Issue
Block a user