I followed this tutorial: accelerometer my AppDelegate the CMDotion manager to get your iPhone app to listen to Added, and added a property to read CMMotionManager for the application in the viewcontroller. Now I'm getting memory usage warnings on my app.
I have application put the glass to the memory profiler tool, and whenever that might see me sitting stationary on'm not interact with the application, table culprit appears in this code: < / P>
[self.motionManager setDeviceMotionUpdateInterval: 0.1]; AQueue = [[NSOperationQueue alloc] init]; [Self.motionManager startDeviceMotionUpdatesToQueue: aQueue withHandler: ^ (CMDeviceMotion * speed, NSError * error) {if (motion.userAcceleration.x & gt; movementThreshold || motion.userAcceleration.y & gt; movementThreshold || motion.userAcceleration.z & Gt; movementThreshold) {MovementCount = 5; }; Speed = zero; }]; The first example line defined inline, was as a last resort I moved in line with the variables a member of my view controller - not having much effect. When I do not turn on the update interval, I do not want to increase memory usage. When I turn on the update interval, the memory increases.
movementCount is declared as a private int for the visual controller, and another thread is being used to track the phone movement lately, with time the counter resets to go back to zero ... but enable / thread that disabling so i do not affect the use of memory the code is left out ...
I do not have web warning Gives that CMMotionManager has excessive memory Usage can cause nothing but see anything but for every minute I leave my app running, another 5 megs of memory is consumed ... there are any tricks to help my problem Reach the fold? ...
Text after "div class =" itemprop = "text">
It looks like I was seeing the wrong column (screenshot) - should have been used the "were watching live bytes" but "total bytes" ... six hours of my life since I am unable to return ...
No comments:
Post a Comment