Leak - GeneralBlock-3584

后端 未结 4 845
有刺的猬
有刺的猬 2020-12-14 12:31

When i try to check leaks of my iPhone App using Instruments, everything is just fine. Same App on actual real device shows this leak for a few times during the app launch.

相关标签:
4条回答
  • 2020-12-14 13:08

    There are leaks in the Apple frameworks. Specifically the HTTP classes. You should raise a radar defect report.

    0 讨论(0)
  • 2020-12-14 13:27

    Leak detection tools can often yield false positives, especially in underlying system libraries.

    I am familiar with these "leaked" GeneralBlocks, and they didn't cause an App Store rejection in my experience.

    IANAASRW**, but I think you're fine.

    ** I am not an App Store Review Wizard

    0 讨论(0)
  • 2020-12-14 13:29

    You have nothing to worry about, this is false positive from Instruments.
    It has to do with freeing resources of the thread that has being terminated. They just hang around until next thread is done and cleans resources after the one which is terminated previously. Instruments take this for a 'leak', but it's a feature of pthreads implementation on the iOS which in perfect world would be handled differently. More on this on the Apple's dev forum here and here.

    0 讨论(0)
  • 2020-12-14 13:32

    Do you have UserDefaults that you hadn't gone into Settings to initialize during those, "first few times," you ran your app?

    I saw the same problem - app was (relatively) clean on the latest Xcode/Simulator (the usual pair of 128 byte mallocs were there - but that's purely a Simulator problem with UIViews). Once I ran it on an iPod Touch, I saw the GB3584.

    However, after going into Settings and changing a setting (which forced the save*), the problem went away.

    • I am using Apple's sample code for UserDefaults to properly read those settings without having to first go in and change something.

    So, it may very well be nothing. If you can confirm that a visit to Settings cleared it up, then we'll know where to start looking for leaks (or where to direct Apple to look).

    0 讨论(0)
提交回复
热议问题