xcode - IOS Memory and Memory Management -


i'm new , earning ios application development , let me tell don't know single bit memory , memory management . while playing tabviewcontroller make 2 tabs , 3 viewcontroller , connect them via navigationalcontroller , link them cycle like:-

navigationcontroller1

firstviewcontroller -> secondviewcontroller -> thirdviewcontroller -> firstviewcontroller

navigationcontroller2

firstviewcontroller -> secondviewcontroller -> thirdviewcontroller -> firstviewcontroller

and run them on simulator , noticed getting viewcontrollers on stack memory increasing .1 mbs.

enter image description here

than add single image of size 4.5 mb on firstviewcontroller (navigationcontroller1) , run app noticed memory reached 66 mb

enter image description here

as app starts , add viewcontrollers on stack memory increasing @ same rate last time (.1 mbs) don't understand reason behind , whats logic of whole seen ?

"and apologies reason buttons not showing in tabbar there 2 title on tabbar navigation1 , navigation2 button has method push views "

when image loaded memory gets uncompressed. while compressed image might not require more 4.5 mb high resolution (for instance saving jpeg), it's uncompressed size might me lot higher. if uiimageview part of screen, or off-screen, still requires amount of memory based on original resolution of image.

also, have view controller loop here. once go vc1 -> vc2 -> vc3 -> vc1 not original instance of vc1 last one, new instance, meaning have total of 4 view controllers in memory @ same time. should go vc3 , vc1 pop view controller stack instead of adding instance of vc1. can calling self.navigationcontroller?.poptorootviewcontrolleranimated(true) on vc3.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -