SFML community forums

Help => Window => Topic started by: phoenix4sfml on February 28, 2016, 10:37:16 pm

Title: memory leak from accessing iOS sensor data?
Post by: phoenix4sfml on February 28, 2016, 10:37:16 pm
Running on an iOS device with one or more sensors enabled (via SensorManager::setEnabled()), seems there's about a .1MB/s leak in memory (with around 60 FPS). Anybody else see this?

Playing with the Objective-C code in SensorImpl.mm, if I wrap accesses of the motionManager properties within autorelease pool blocks, then memory doesn't appear to leak anymore. I noticed too that SFML is building with ARC disabled. That seems out-of-favor these days (in favor of using ARC). I couldn't get toggling of ARC use to avoid the leak however.
Title: Re: memory leak from accessing iOS sensor data?
Post by: Laurent on February 28, 2016, 10:47:37 pm
If I remember correctly, the iOS code is made with ARC in mind. If it's not enabled by default, then it's most likely a bug, but unfortunately nobody works on this port anymore.