Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3489324
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T11:22:54+00:00 2026-05-18T11:22:54+00:00

Recently I have finished my first Iphone app and it works grate…. except for

  • 0

Recently I have finished my first Iphone app and it works grate…. except for when i did a intense session using instruments to find leaks after awhile with no leaks, all of a sudden get about 1.3Kb worth. In the stack trace they all point to the exact line that I release a UIViewControler on after pushing it to the Navigation controller (Ill post this code a bit further down). The Leak seem to happen after a few time navagating through the ViewControlers and back again. I know this is a very generally question but I hope someone could point me in the right direction. I have spent a few days trying to solve this and it is starting to dive me crazy!

My app is a Navigation based one, here is how it works in a nutshell:

Starts with a UIViewControler which when a button is pressed goes to another UIViewControler containing a TableView.
From here depending on the contents of the array that populates the TableView it could go to a UIViewControler containing a PickerView then to the last UIViewControler or just go straight to the last UIViewControler bypassing the one with the PickerView.

Here is the code that the stack trace says the Leak is on:

SoundConfiger *third = [[SoundConfiger alloc] initWithNibName:@"SoundConfiger" bundle:[NSBundle mainBundle]];
    [third setTitle:@"Sound Link"];
    third.myData = myData;
    third.selectedRow = row;
    third.currentChoise = nil;
    [self.navigationController pushViewController:third animated:YES];
    [third release];    <---- Instruments says the leak is here on this line.

Shouldn’t the NavigationController be responsible for this UIViewcontroler now? I have not called retain on third anywhere else and it only exists in this function.

I have a Bunch of Leaks from UIkit and QuartsZone. I have a screen shot bellow of some of them, in the stack traces all point to the same snippet of code, in the same function, in the same object as stated above at some point in the trace:

Here is a Link to the image as I can’t post images yet: Link no longer valid

Here is the compleat stack trace from the first GeneralBlock-16 in the list. The one in bold (line 29) is the code snippet above:


0 libSystem.B.dylib malloc

1 CoreFoundation -[__NSArrayM insertObject:atIndex:]

2 CoreFoundation -[__NSArrayM addObject:]

3 UIKit -[UIView(UIViewGestures) addGestureRecognizer:]

4 UIKit -[UISwitch _commonInit]

5 UIKit -[UISwitch initWithCoder:]

6 UIKit UINibDecoderDecodeObjectForValue

7 UIKit UINibDecoderDecodeObjectForValue

8 UIKit -[UINibDecoder decodeObjectForKey:]

9 UIKit -[UIView initWithCoder:]

10 UIKit UINibDecoderDecodeObjectForValue

11 UIKit -[UINibDecoder decodeObjectForKey:]

12 UIKit -[UIRuntimeConnection initWithCoder:]

13 UIKit UINibDecoderDecodeObjectForValue

14 UIKit UINibDecoderDecodeObjectForValue

15 UIKit -[UINibDecoder decodeObjectForKey:]

16 UIKit -[UINib instantiateWithOwner:options:]

17 UIKit -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:]

18 UIKit -[UIViewController _loadViewFromNibNamed:bundle:]

19 UIKit -[UIViewController loadView]

20 UIKit -[UIViewController view]

21 UIKit -[UIViewController contentScrollView]

22 UIKit -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:]

23 UIKit -[UINavigationController _layoutViewController:]

24 UIKit -[UINavigationController _startTransition:fromViewController:toViewController:]

25 UIKit -[UINavigationController _startDeferredTransitionIfNeeded]

26 UIKit -[UINavigationController pushViewController:transition:forceImmediate:]

27 UIKit 0x6ea9b5

28 UIKit -[UINavigationController pushViewController:animated:]

29 Booby Trap -[SelectEventTypeviewcontroler ChooseThisOne] /Users/chriswyllie/Documents/Booby Trap/Booby Trap/Classes/SelectEventTypeviewcontroler.m:91

30 CoreFoundation -[NSObject(NSObject) performSelector:withObject:withObject:]

31 UIKit -[UIApplication sendAction:to:from:forEvent:]

32 UIKit -[UIApplication sendAction:toTarget:fromSender:forEvent:]

33 UIKit -[UIControl sendAction:to:forEvent:]

34 UIKit -[UIControl(Internal) _sendActionsForEvents:withEvent:]

35 UIKit -[UIControl touchesEnded:withEvent:]

36 UIKit -[UIWindow _sendTouchesForEvent:]

37 UIKit -[UIWindow sendEvent:]

38 UIKit -[UIApplication sendEvent:]

39 UIKit _UIApplicationHandleEvent

40 GraphicsServices PurpleEventCallback

41 CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION

42 CoreFoundation __CFRunLoopDoSource1

43 CoreFoundation __CFRunLoopRun

44 CoreFoundation CFRunLoopRunSpecific

45 CoreFoundation CFRunLoopRunInMode

46 GraphicsServices GSEventRunModal

47 GraphicsServices GSEventRun

48 UIKit -[UIApplication _run]

49 UIKit UIApplicationMain

50 Booby Trap main /Users/chriswyllie/Documents/Booby Trap/Booby Trap/main.m:14

51 Booby Trap start


Thanks for your help in advance, I am hope I am just doing something silly and I need a fresh set of eyes to see it. Let me know If you need more info.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T11:22:55+00:00Added an answer on May 18, 2026 at 11:22 am

    Well I am a Tool 🙂

    I was not handeling the IBOutlets correctly in each viewControler.

    I was not declaring each IBOutlet using @property with a retain, using “self.someLabel = nil” (to release and set to the IBOutlets to nil) in the viewDidUnload method for a memory warning and then finally releasing in in dealloc.

    thus tool. lol

    What I was doing was declaring was “IBOutlet UILabel *someLabel;” in the header with no @property and this was causing the leaks seen above, they don’t happen right away it takes a while and when they do the stack trace and every thing dose not help to much.

    They only way I found what was leaking was striping everything out of my app and I mean everything until the leak went away.

    Thanks for your help Ishu Gupta, I am glad we had a outcome.

    Here are the relevant link to show how to do IBOutlets correctly: What happens if I don't retain IBOutlet?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.