This repository was archived by the owner on Feb 2, 2023. It is now read-only.
[ASTextNode] Fix ASTextNode shadow is not rendering - #2042
Merged
Adlai-Holler merged 2 commits intoAug 9, 2016
Conversation
| @@ -1044,6 +1049,7 @@ - (void)setShadowColor:(CGColorRef)shadowColor | |||
| CGColorRetain(shadowColor); | |||
| } | |||
| _shadowColor = shadowColor; | |||
Contributor
There was a problem hiding this comment.
Since you're already in this code, could you add if (_shadowColor != NULL) { CGColorRelease(_shadowColor); } so we stop leaking them 🚰
Contributor
|
Love this, let's land it ASAP. Thoughts about comment @maicki ? |
Contributor
Author
|
@Adlai-Holler Fixed the memory leak ready to go |
| if (_shadowColor != shadowColor) { | ||
| if (shadowColor != NULL) { | ||
| CGColorRetain(shadowColor); | ||
| CGColorRelease(_shadowColor); |
Contributor
There was a problem hiding this comment.
Hmmm... I think we need to move this out of the if statement and wrap it in a new one: if (_shadowColor != NULL) because no matter what the new value is, if we have an old value we must release it
Contributor
|
Sweet! |
hannahmbanana
pushed a commit
that referenced
this pull request
Aug 9, 2016
* Passing through shadow in renderer attribute * Fix memory leak setting shadow color
maxsz
pushed a commit
to equinux/AsyncDisplayKit
that referenced
this pull request
Aug 11, 2016
…2042) * Passing through shadow in renderer attribute * Fix memory leak setting shadow color
hannahmbanana
pushed a commit
that referenced
this pull request
Aug 15, 2016
* Passing through shadow in renderer attribute * Fix memory leak setting shadow color
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We didn't pass through shadow properties via the renderer attributes. That meant that the renderer shadower didn't get those and so setting a shadow on the text node did not have any effect.