I have a navigation controller-based application with 5 view controller inside. When I push a view controller I allocate some memory and when I go back with popViewController my delloc() method is correctly called. I'm sure that the dealloc is called in the right way for every view controller I push and pop.
Nevertheless when I run the application with Instruments (Start with performance tools -> Object allocations, Leaks) there is a strange behavior for me. When a view controller is pop the memory usage does not decrease, to be exact it does not decrease as expected: when I start the application it use 950 KB, then I push the first view controller and the memory usage increase up to 1,56MB, finally I pop the view controller and the memory usage is now 1,55MB.
Is this behavior right?? I'm sure that every dealloc method is correctly called whenever I pop a view and the Leaks instrument does not show any memory leak. I guess that the operating system is "retaining" in some way the view so that to second time I push the same view controller the loading process is much more fast...
Could someone confirm that this behavior is right? Thanks