void OnDisable() { if (s_gtaAudioFiles != null) { s_gtaAudioFiles.Dispose(); s_gtaAudioFiles = null; } }
/// <summary> /// Dispose GTA audio files /// </summary> private void DisposeGTAAudioFiles() { if (gtaAudioFiles != null) { gtaAudioFiles.Dispose(); gtaAudioFiles = null; } sfxAudioClips.Clear(); streamsAudioClips.Clear(); foreach (AudioStream audio_stream in streamsAudioStreams.Values) { if (audio_stream != null) { audio_stream.Dispose(); } } streamsAudioStreams.Clear(); StatusText = "Select a GTA audio files directory"; }