objective c - iOS Low Memory Warning in MapKit/SDWebImage -


i've become frustrated enough beg insights mob. have application using mapkit, on tap shows thumbnail, , on tap of thumbnail shows photo gallery of images. images using sdwebimage. i've looked @ allocation tables , see map alone using ton of memory. peaks @ around 60mbs, kind of crazy. when open gallery drops around 40/35mbs. can @ 1 gallery find, open second gallery , start scrolling crashes, though memory use around 35mbs.

my first attempts @ combating purge webimage cache on didreceivememwarning, second remove map , annotations. app using arc.

here question... how can fix this? stop memory crash. help?

crash report

free pages:        1188 active pages:      6757 inactive pages:    4192 throttled pages:   89007 purgeable pages:   0 wired pages:       26699 largest process:   dbconnect  processes  name                    <uuid>                       rpages       recent_max       [reason]          (state)  accountsd <e6ceba0e6e053a3ea02d0a916903cff8>          284              284         [vm]         (daemon) (idle)     installd <117f65beb8cb38da8e0844256c65e402>          301              301         [vm]         (daemon) (idle) networkd_privile <cd5f76fd767c31428f411ecf03540546>          115              115         [vm]         (daemon) (idle)          lsd <566268cf717b335e98ddba10ca9315ab>          265              265         [vm]         (daemon) (idle)   mobilemail <e07ca7a7280736c7bf301451f89d1c02>         1022             1022         [vm]         (resume) (continuous)  mobilephone <51866c9bc9f93c9d8526e8acf9efc64c>          998              998         [vm]         (resume) (continuous)         tccd <2778744d99a530c9a7d5e57a19b60008>          161              161         [vm]         (daemon)    dbconnect <f628b610fcc23c559f2a96959ac78b15>        21523            21523         [vm]         (frontmost) (resume)         ptpd <096297a7a40f318290a972274cc44d87>          591              591                      (daemon)        wifid <72eda25ccdd737a79d6cd172e9bf99a5>          615              615                      (daemon)      syslogd <da215e2d3de133bf8f52590727b9bdfe>          270              270                      (daemon)   aosnotifyd <47126a998bb5308f9d5cbe028dc47d60>          447              447                      (daemon)    locationd <137100f254373daeb894f665c413f8b0>         1023             1023                      (daemon) iaptransportd <9b3cf56b4db13761bbd8ac2e0ff099be>          242              242                      (daemon)  dataaccessd <abc7f74d5d683d4c9a04e7ade5b1126b>         1835             1835                      (daemon) mediaserverd <af72564bf8713fb8b16ee64c5ee85568>         1645             1645                      (daemon)  springboard <bd1d77d154ef3dffbb53d89337c8a08f>         4057             4057                        backboardd <e1dc74434e0e3938b17ff0f7ad85d138>         9463             9463                      (daemon)    lockdownd <a123aa04ddf83a5fae8e5bc08f0b5771>          260              260                      (daemon)       powerd <63673a83ac9c3cf98fdc75df8ba70fd0>          156              156                      (daemon) mdnsresponder <1e651badfb7033a68a73a667ec480a08>          247              247                      (daemon) usereventagent <7ee3410c25e4372d84e93318fe42696b>          534              534                      (daemon) syncdefaultsd <a18b8aeea66e3ebb9ab0d54e55c1b9d1>          263              263                      (daemon)   dtmobileis <0e7e02810e383e2c9ebc212d94b6044f>            0                0                      (daemon) mobile_profile_j <9e3c8e8611da3c68af7e5511500256de>          194              194                      (daemon) springboardservi <438ae856a1c039a197e6987a99a8b9b6>            0                0                      (daemon) syslog_relay <ee47daae952636649230d38b3dc5c2e0>            0                0                      (daemon)         afcd <3bd960d39c9f3972a10923db0e687b4a>          152              152                      (daemon) notification_pro <08df322fbe7739199f78852a511169ef>          136              136                      (daemon)    absinthed <b5e167e1b2dc3bf9b5f704afb30aed5f>          105              105                      (daemon) filecoordination <28ca39773e933ed2aa92c117c661d056>          164              164                      (daemon)         apsd <5be27dc5ea5234319bc4b47380e42174>          342              342                      (daemon)    distnoted <699b8253736233b29180419f139e8c01>          121              121                      (daemon)     networkd <49064febbe553338bd98051399022da4>          182              182                      (daemon)   aggregated <c5a375854c3c31d59548ab53ea86d194>           93               93                      (daemon)    fseventsd <3ea853cb95de3aa48972aa42637af69a>          344              344                      (daemon)     btserver <af0150d5085e326598edff072a23d146>          243              243                      (daemon)      imagent <2b64c6111aa63b179a15afd6a76a6696>          387              387                      (daemon)      configd <b6a4d70640b63e8f82e0e9f3d6ee2bb9>          510              510                      (daemon) fairplayd.p106 <c5ca0bc497013131a5c17a89fdedcd82>          175              175                      (daemon)         geod <d180dd46c4bd3ffbb856b5eb8589a45c>          296              296                      (daemon)   commcenter <cb877b4411ee3a348ec44c02ff3da38d>          608              608                      (daemon)      notifyd <67a17b0c297e3785a9e09b8e72f3636a>          188              188                      (daemon) 

allocation graph allocation graph

allocation table allocation table

i figured out on own. in case 1 else runs i'll explain. solution simple. using cocoapod called uiphotogallery. problem. in causing memory not released. didn't bother trying fix it. instead found 1 worked better. we're using mwphotobrowser (https://github.com/mwaterfall/mwphotobrowser). works charm , wasn't difficult setup.

in case else looking gallery library tried:

  • ios-krimageviewer
  • nimbus
  • gvphotobrowser
  • uiphotogallery

all of either complicated, lacked documentation, or didn't work good. hope helps others.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -