Skip to content

Remove calls to CGColorRelease in box shadow impl#45488

Closed
joevilches wants to merge 2 commits into
facebook:mainfrom
joevilches:export-D59819536
Closed

Remove calls to CGColorRelease in box shadow impl#45488
joevilches wants to merge 2 commits into
facebook:mainfrom
joevilches:export-D59819536

Conversation

@joevilches
Copy link
Copy Markdown
Contributor

Summary:
In certain cases where the color fails to parse, this code will throw an exception since the underlying color does not exist and we are trying to free it. We do not actually need to even do this, since we obtain the CGColor from a UIColor. The UIColor will manage the memory of the CGColor in this case so we are fine.

Source: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D59819536

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 17, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D59819536

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Jul 17, 2024

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 21,353,388 -213
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 24,549,503 +53
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 394aae1
Branch: main

Summary:
Pull Request resolved: facebook#45481

We are going with this name as it is more commonly used in the spec and makes more sense since there are no circles involved with spread

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D59819180
Summary:
Pull Request resolved: facebook#45488

In certain cases where the color fails to parse, this code will throw an exception since the underlying color does not exist and we are trying to free it. We do not actually need to even do this, since we obtain the CGColor from a UIColor. The UIColor will manage the memory of the CGColor in this case so we are fine.

Source: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-SW1

Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D59819536
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D59819536

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 18, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 66465fb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants