How to release memory from audio clip ?

I use the following code to load audio clips

WWW www = new WWW("file://" + strFile);
yield return www;
AudioClip ac1 = www.GetAudioClip(false, true);

from profiler memory section, i can see the AudioClips number keep increasing whenever i load a new file, but it never reduce, so it will only use up more and more memory, i want to know if there is a way to reduce it or let garbage collector to do its work ?

1 Like

I think ive found a solution after hours of searching

AudioClip.Destroy(ac1);

I wasnt able to delete this thread, so thanks for reading my question and my own answer =)

4 Likes

Answering your own question could be useful to someone else in future :stuck_out_tongue: I guess it’s a good thing you couldn’t delete it

2 Likes

Thanks, this helped me. Sorry to necro this post. :slight_smile:

1 Like