Michael Bateman
Member
Hi all
When debugging recording audio, I have a memory leak and I can't work out why it is occurring. It seems that when I use async audio recording, a buffer is automatically created that I have not requested. It then sits there in memory and thus creates a leak. I am aware a temporary buffer is created, but this should then be wiped automatically ( and I think it is ), but this random buffer then still remains. It's just a bunch of 0s (size 256, tell 0). Is this a bug or am I being stupid?..
To elaborate on the planned process; I create a buffer to store my audio recording in (and store the index for wiping later). I then use the async audio recording to fill the buffer I've created from the temp buffer. This all works swell and I wipe the buffer later on when I no longer need it.
I have a created a workaround of clearing all buffers at the end of the game turn - which is fortunately easy as buffers are indexed from 0. So I just loop through and wipe them all. So not critical leak for me - but I would like to understand what is going on! - If anyone has any ideas...
When debugging recording audio, I have a memory leak and I can't work out why it is occurring. It seems that when I use async audio recording, a buffer is automatically created that I have not requested. It then sits there in memory and thus creates a leak. I am aware a temporary buffer is created, but this should then be wiped automatically ( and I think it is ), but this random buffer then still remains. It's just a bunch of 0s (size 256, tell 0). Is this a bug or am I being stupid?..
To elaborate on the planned process; I create a buffer to store my audio recording in (and store the index for wiping later). I then use the async audio recording to fill the buffer I've created from the temp buffer. This all works swell and I wipe the buffer later on when I no longer need it.
I have a created a workaround of clearing all buffers at the end of the game turn - which is fortunately easy as buffers are indexed from 0. So I just loop through and wipe them all. So not critical leak for me - but I would like to understand what is going on! - If anyone has any ideas...