开发者

App Crashed Because of Low Memory

How can I setup my app to handle low memory situations? What are best practices?

Incident Identifier: 8BFDA96C-1019-4316-A278-CB86CC67172A
    CrashReporter Key:   1657e021ecba3a19c5ed9f0cff62947a426a2bc2
    Hardware Model:      iPhone3,1
    OS Version:          iPhone OS 4.1 (8B117)
    Date:                2010-09-28 00:00:12 -0700
    Time since snapshot: 864 ms

Free pages:        1103
Wired pages:       20977
Purgeable pages:   0
Largest process:   SpringBoard

Processes
         Name                 UUID                    Count resident pages
       securityd <3dcc6e23849cb3ee197720700284156d>     231
          Reeder <dcb69039fa5b4426b3db9f9920054f3e>    9384
             CNN <2da9830626fc69a5885dbb599e7e3910>    5803
         Dropbox <2ed4326c3936d079605d309c05d2a7e3>    4340
        Evernote <7519f2ea10cad2abbf13ad33177aa69e>    2610
          TripIt <37c12bdfbecbf6af9933592e7fae98bd>    2111
MobileMusicPlaye <02ed082c795446617957bbae8974a2c8>    1619
     dataaccessd <40c418e18e9bbd950ef7e3fb593645de>     681
          Stocks <55e537a6739e58dc068e1436930213ba>    1169
        Campfire <15b6957c18195a7fd06c6a3b3f6e0c76>     809
     MobileTimer <98640aaee653fc9188652d6cdab13d67>     985 (jettisoned)
        BTServer <ce7c062b4df09b835c77a6086b7ef0d8>     349
      StockTwits <e8ad700990fe71025d9aeba2dd984cfa>    3482 (jettisoned)
    MobileSafari <67a5ebc3754e0ce1e482760c7e56f9c5>    3641 (jettisoned)
    mediaremoted <507d59f44f735d6e2855b23a6275557a>     184
         Twitter <62edb7ce453c603ad1b8b3bdcbc4910b> 开发者_C百科  10862
        Facebook <ae1fa9da7f8951ffbf693bbd0ed36aaf>    8217
      calaccessd <90c4c48a02f0dbf0d1adaad27b8d5945>     526
  GV Mobile Plus <179e36b7f3ae7f1f9b784308e1e20f78>    3612
     Preferences <9123dcc666c97bb1d63a5921968c8b34>    1662
       MobileSMS <bbe1ba067afb113c7be6a7f2e7542da8>    2095
    mediaserverd <3ebe3a043c2dba96b70d8ede30bcb6ab>    2178
     debugserver <2cd82985d402f2c9daf1b379c72dfd9b>      68
     debugserver <2cd82985d402f2c9daf1b379c72dfd9b>      69
        SCHelper <30ca097cbb6306cf66157da7fd4de07c>     113
      MobileMail <215c71d2434ce352d04786b93cda5340>    5754
     MobilePhone <b50b6283b8c52a51fb9e48ee5c909b80>    2859
MobileStorageMou <bd2184fe17b3c9ccbadd9120bd669c99>     101
         imagent <4ef86a68405738280f19e5fbc0af56db>     288
             lsd <4fb2cf7b5475b39b2c56d9588821eb45>     152
         notifyd <ab40010781bef81228df18acf1acdbb2>     171
      CommCenter <a8a6257faa2a5213f0a2f5c763f9acfe>     841
     SpringBoard <983033e585706c1c6c99eed85cd8dbdb>   18145 (active)
      accessoryd <b99ccd1b099c015edb93e8d1cbf03e36>      85
            apsd <f031a0e787d8840097a4812fb1c89f5e>     235
        awd_ice3 <b598d42ac4fdd950ac5c2c9a1835f70e>     170
         configd <b2b3af98743381e759dd5b17115a0378>     449
   fairplayd.N90 <3ae05b3bbcb034b0d4d4712e8fc19f99>      80
       locationd <963c5d93cfaf1b1139045b1658ecfc26>     935
   mDNSResponder <68dc311f118d171ede7b91f43c323b7d>     202
       lockdownd <bfeda752b819f06f4828e112d3ca695c>     341
         syslogd <60e8005a73e76d6ee81a8b45a9443a16>      84
         launchd <b15ff1a8f2f37c3b0df0343899757b17>     104

**End**


handle -didReceiveMemoryWarning in your controllers and run your code through analyzer.

work with NSZombieEnabled, this link might be helpful

http://www.frogameleon.com/blog/last-night-an-iphone-zombie-nszombieenabled-saved-my-life


Try to run your application with Leaks (Run->Run with Performance Tools->Leaks), and see if you can find any leaks.

You should always release stuff you're not using anymore to reduce your memory-footprint.

See this question: iPhone Development - Memory limitation for iphone application

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜