iOS SDK problem of memory with the method readData from NTEegChannel

Hi the Brainbit Team,

I have a problem of memory when I start to Read the Data (the same as the one that I had with readData in Android and not readFast). I am using the function readData from the NTEegChannel class and it seems like there is a buffer inside or something like that, that gathers and stores all the data when we do readData. I thought it was from my code so I have used Instruments to debug all of this and I have found out that there is a lot of allocation done inside the readData function. (You can find attached the picture of the Instruments allocation test which shows that there are a lot of _ContiguousArrayStorage created). After 7 min and 25 sec, these _ContiguousArrayStorage things represents 915 MiB which is huge and then the app crashs because of the memory problem. It might also be a problem with my code so you can also find attached part of my code where I receive the data.

So as mentioned before, I have experienced exactly the same problem in Android with the function readData and the solution was to use the function readFast. So is there any other function like readFast for iOS? I have not seen it in the framework.

Regards. Capture_d_écran_2019-12-18_à_22.02.42Capture_d_écran_2019-12-18_à_22.15.02

Edited Dec 18, 2019 by Cyri
Assignee Loading
Time tracking Loading