Skip to content

Commit c88a38b

Browse files
1802846624AlianBlank
authored andcommitted
fix:修复Soundmanager.PlaySoundInfo嵌套在PlaySoundInfo._UserData中无法Release问题
Signed-off-by: 1802846624 <[email protected]>
1 parent eb041f2 commit c88a38b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Runtime/Sound/Sound/SoundManager.PlaySoundInfo.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,12 @@ public void Clear()
130130
m_SerialId = 0;
131131
m_SoundGroup = null;
132132
m_PlaySoundParams = null;
133+
if (m_UserData is Sound.Runtime.PlaySoundInfo soundInfo)
134+
{
135+
ReferencePool.Release(soundInfo);
136+
}
133137
m_UserData = null;
134138
}
135139
}
136140
}
137-
}
141+
}

0 commit comments

Comments
 (0)