Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Protection from Retain Cycles, Require Self all the time #12

@crashoverride777

Description

@crashoverride777

Thanks for this awesome guide, very detailed and informative and helped me so much.

I have 1 issue with the Protection From Retain Cycles section. You said

"We found that we made less mistakes when we just required self all the time than if we have to decide wether to write it or not"

I dont understand how this makes sense, the opposite actually should be the case.
If you only use self when required (e.g in closures) it is much easier to spot a potential retain cycle because when the compiler requires you to write self, you know you will most likely deal with a retain cycle.
If you use self all the time than I cannot see how that will make your life easier.

Also code should be more readable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions