发现了位于Native堆上严重的内存泄露
This commit is contained in:
@@ -647,8 +647,8 @@ namespace Demo
|
||||
|
||||
public void EnableScript(string sourcePath, string scriptPath, string scriptType, ScriptableObject parent)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
s_PreparePerfMarker = new(scriptPath);
|
||||
#if UNITY_EDITOR||true
|
||||
s_PreparePerfMarker = new(ScriptName);
|
||||
#endif
|
||||
if (isEnableScript)
|
||||
{
|
||||
@@ -705,7 +705,7 @@ namespace Demo
|
||||
public string ScriptPath;
|
||||
public string ScriptTypename;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR||true
|
||||
public ProfilerMarker s_PreparePerfMarker;
|
||||
#endif
|
||||
public ScriptableObject Parent;
|
||||
@@ -1129,7 +1129,7 @@ namespace Demo
|
||||
return;
|
||||
if (gameObject.activeInHierarchy == false)
|
||||
return;
|
||||
#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR||true
|
||||
s_PreparePerfMarker.Begin(this);
|
||||
#endif
|
||||
if (tickType == TickType.Reset)
|
||||
@@ -1148,7 +1148,7 @@ namespace Demo
|
||||
{
|
||||
child.ScriptUpdate(currentTime, deltaTime, tickType);
|
||||
}
|
||||
#if UNITY_EDITOR
|
||||
#if UNITY_EDITOR||true
|
||||
s_PreparePerfMarker.End();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user