Ejecta icon indicating copy to clipboard operation
Ejecta copied to clipboard

another unsure mem leak

Open lenew opened this issue 13 years ago • 3 comments

change Audio.src may cause leak, but i am not very sure of that.

lenew avatar Dec 07 '12 09:12 lenew

I can't find anything suspicious. JSValueToNSString always returns an auto-released string, and the Audio's path is released before it's re-assigned and retained.

phoboslab avatar Dec 07 '12 13:12 phoboslab

i thind i have found the problem. in EJOpenALBuffer.m alDeleteSources should be placed before [buffer release];

lenew avatar Dec 08 '12 05:12 lenew

I've looked into it, but I can't really find anything.

Did you mean the EJAudioSourceOpenAL.m, around line 34? Why should it make a difference if the source is deleted before the buffer? Does the source somehow retain it?

Edit: whoops, you're right. The OpenAL docs spell it out "Buffers which are attached to a source can not be deleted."

phoboslab avatar Dec 13 '12 20:12 phoboslab