Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: memory leak from accessing iOS sensor data?  (Read 1984 times)

0 Members and 1 Guest are viewing this topic.

phoenix4sfml

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
memory leak from accessing iOS sensor data?
« 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: memory leak from accessing iOS sensor data?
« Reply #1 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.
Laurent Gomila - SFML developer

 

anything