Latest XCode leaking file handles/ports?

Discussion in 'iOS Programming' started by junkster, Nov 18, 2013.

  1. junkster macrumors regular

    Joined:
    Nov 6, 2006
    #1
    I'm looking for someone else to verify this:

    1. Open up your iOS project in XCode.
    2. Open Activity Monitor, click the Memory tab.
    3. Find XCode and note the number in the "ports" column. This may only be available in Mavericks.
    4. Run your app in any of the simulators, then quit it.
    5. Check the number of ports again in step 3.
    6. Repeat a few more times, just to make sure.

    For me, the number increases significantly every time I run my app. After several hours of work it has climbed from 300 to 3000.
     
  2. Duncan C macrumors 6502a

    Duncan C

    Joined:
    Jan 21, 2008
    Location:
    Northern Virginia
    #2
    Its likely the simulator that's leaking, not Xcode. Over the years since Apple released the iOS SDK I've seen a variety of leaks in the simulator. Try quitting the sim and relaunching it. I bet your port count drops.
     
  3. junkster thread starter macrumors regular

    Joined:
    Nov 6, 2006
    #3
    Good idea, but quitting the sim and relaunching doesn't change the port count in XCode.
     
  4. iMacFarlane macrumors 65816

    iMacFarlane

    Joined:
    Apr 5, 2012
    Location:
    Adrift in a sea of possibilities
    #4
    Either Xcode or the Simulator, if ports are truly being leaked, the only way I see to free them is to reboot the OS. I've recently gotten serious about programming, and found that when I'm tweaking something in one of my projects, and starting / stopping code a lot, things start to get really wonky after a few hours. A sure fire fix is to reboot. Not optimal, but definitely effective.
     

Share This Page