I am in the process of learning objective-C in my own time and creating my first iPhone application however I seem to be having problems releasing the memory of my allocated views. I think there is to much code to include in the question itself so I have created a small sample application and uploaded the code to github (here: https://github.com/MatthewStacey/PauseTest).
In the sample app I have three views, a main page, a game page and a pause view.
On the Main page there is a button which will take you to the game page (with fade in/out animation).
On the game page there is a button which will display the pause view (UIView).
On the pause view there are two buttons, one which will hide the view and leave the game page being displayed and another which will display the main menu.
Functionality wise the sample app does what it is supposed to do (i.e. there are no leaks and the appropriate views are displayed), however when I look at the app in Instruments Activity Monitor the memory being used continually increases as you show/hide the three different views.
I have spent the best part of two weeks reading and trying to figure out what I am not releasing correctly to no avail. Could someone please take a look at the project I have uploaded to github and tell me where I am going wrong and how I can overcome this problem?
I am happy to provide more information/clarification if it is needed. Please note I have targeted iOS4.