GithubHelp home page GithubHelp logo

Comments (7)

JackLSH2016 avatar JackLSH2016 commented on April 27, 2024 29

只是路过!

from fbretaincycledetector.

Gricha avatar Gricha commented on April 27, 2024 10

Yes, NSGetSizeAndAlignment throws exception that will be caught by exception breakpoint. The safest is to turn off exception breakpoint when using retain cycle detector.

from fbretaincycledetector.

Gricha avatar Gricha commented on April 27, 2024

Hey! Interesting, in general some types are unavailable to query for (for example if you have a struct and this struct has bitfields at the beginning and some objects at the end, we wouldn't cover that).
Because NSGetSizeAndAlignment() can throw we have wrapped that in @try-catch block.

So that's the idea - the question is - why the exception was not caught. Frameworks might be to blame, I'll look into it a little bit more.

from fbretaincycledetector.

Gricha avatar Gricha commented on April 27, 2024

Are you in debug mode? There is a good chance you are not crashing but are stopping in exception breakpoint. Could you try disabling this and check if the issue is still happening for you?

from fbretaincycledetector.

kastiglione avatar kastiglione commented on April 27, 2024

Yes, the 'b' is _C_BFLD, a bitfield.

Since there's some encoding parsing going on, I wonder if there should be a black list of known bad types, like bitfields, to avoid going down a path that is sure to fail.

from fbretaincycledetector.

Gricha avatar Gricha commented on April 27, 2024

That is a good point. Especially that, IIRC, throwing and catching exception is not exactly "free" :P

Maintaining short check-list before falling in might be a good thing for performance, the question is if it's cheaper to sometimes throw & catch, or constantly do a lookup in every ivar check.

Thoughts?

from fbretaincycledetector.

HaloWang avatar HaloWang commented on April 27, 2024

In my UIViewController class, I create a property like this:
@property (nonatomic, strong) void(^aBlock)();
and I'm sure there is a retaincycle between my viewController and this property.
When I use FBRetainCycleDetector, my problem stop at FBClassStrongLayout.m line 43, with a global All Exceptions Breakpoint.
image

from fbretaincycledetector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.