ios - Different behaviour for allocations instruments (with and without zombie-mode) -


i'm struggling memory management in ios or more precisely monitoring complex memory usages.

so i'm wondering allocations instrument provided once in zombie-mode (when i'm looking zombies) , in general "normal" allocations instrument (chosable memory->allocations).

if i'm searching zombies allocations instrument shows me different numbers of storage allocated @ moment (live bytes). every click on ui live bytes increasing lot.

but in normal allocations window (memory->allocations) seems (almost absolutely) fine. so, 1,13 mb of live bytes allocated, maximum of allocated bytes in contrast description above can reach 4-5 mb clicks on ui. seems weird me.

is there more count in zombies->allocations not regarded in normal allocations-window?

note: there no zombies , leaks in program.

as far understand zombies feature, seen mutually exclusive leaks , object allocation in instruments.

in fact, when enable zombies (instruments or nszombies directive), happens "normal" retain cycle of objects tricked can detect attempt @ using object has been deallocated. in sense, don't know details it, if retain count incremented one, , error attempt @ using deallocated instance, when retain count goes 1. indeed, if retain count go zero, object deallocated , in cases impossible detect attempt @ reuse, since can happen long time after deallocation , chunk of memory have been reallocated other object. artificial increment of retain count serve allow object survive "would be" deallocation; when retain count goes 1, flag set in object runtime knows attempting send message "would be" deallocated object, , full error message.

this mental model of it, allows me explain why memory allocation higher when zombies enabled (i.e., because objects not deallocated in normal case).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -