开发者

Is there an official reference stating that battery life is one of the reasons why a Garbage Collector was not included inside iOS?

开发者 https://www.devze.com 2023-01-15 19:39 出处:网络
In the following SO question, it is mentionned that the Garage Collector was not included in iOS in order to conserve battery power.

In the following SO question, it is mentionned that the Garage Collector was not included in iOS in order to conserve battery power.

Is there an offical reference from Apple stating th开发者_运维百科at battery life is one of the reasons why a Garbage Collector was not included inside iOS?

I have been looking for it on google but was not able to find anything relevant.


... stating that battery life is one of the reasons why a Garbage Collector was not included inside iOS?

  • I would call that either good PR or agressive fanboyism. A good GC adds little overhead, especially no amount of overhead anyone would have to be concerned about. Problem is that Apple doesn't have a good garbage collector.

  • Objective-C's garbage collector is conservative and doesn't do compaction, which means that applications will leak memory over time and if you have a long-running app on your phone it will eventually eat up all available memory and crash. Actually that's the reason Apple recommends not using it for long-running tasks even on Mac OS X.


There is definitely also a major problem with unpredictable performance on all limited resouce devices. A colleague and mine were hired by Intel for the Pentim 3 launch to make some hefty UI stuff that showcased the AWESOME power of this processor so that everybody would upgrade.

For some reaon it was decided that a Java-based 3D interface to the Excite search engine was the ultimate solution. Planets with moons would represent result pages and individual search results. Space age stuff. This was obviously before the big internett ka-blam when people had way too much money and grand vision of a 3D cyberworld.

Well, the garbageman always popped in at the wrong time and frequently, so we did what we had to do back then and ask for a ton of memory and write our own allocation stuff. The client had no tolerance for jumpy GFX.

That did the trick, dirty as it may seem today.

I maintain that Apple's decision has most to do with little memory availabe plus wanted optimal, even speed in apps and games. They are not the kind of people who are happy with people going "argh, now it˙s lagging again."

I refer you to the recent hooplah around 4.x being dog slow on some devices. The new update kicked out some features to trade off for performance.

0

精彩评论

暂无评论...
验证码 换一张
取 消