Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Annotate -didLoad with an attribute (if supported) that will flag missing didLoad calls #26

Merged
merged 1 commit into from
Oct 15, 2014

Conversation

toulouse
Copy link
Contributor

I was getting some bizarre memory deallocation calls on a trivial demo. In building a repro case, I realized it was because I didn't call [super didLoad] in my node subclass (there were no problems after I did this). It'd be nice to get a warning for this, so I added in ASDISPLAYNODE_REQUIRES_SUPER in ASBaseDefines.h and applied it to didLoad.

@toulouse
Copy link
Contributor Author

Actually, getting some different bizarre behavior that may not be related to this that led to the crash after all. This might be convenient, but doesn't fix the odd crash I'm getting. Looking into it.

@toulouse
Copy link
Contributor Author

Weird crash is unrelated and reported as #29, but this is still probably useful so people remember to call -didLoad. Think it's acceptable?

@secretiverhyme
Copy link
Contributor

I like it — let's round up the other methods that require super and include them too! cc @acoomans

appleguy added a commit that referenced this pull request Oct 15, 2014
Annotate -didLoad with an attribute (if supported) that will flag missing didLoad calls
@appleguy appleguy merged commit fd9f127 into facebookarchive:master Oct 15, 2014
@appleguy
Copy link
Contributor

Thanks for implementing this @toulouse ! I'll make a new task to go back and add annotations for other methods this would be useful for.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants