Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unneeded CFStringRef allocations in CFURL. #205

merged 4 commits into from Jan 6, 2016


Copy link

DarrylBayliss commented Jan 2, 2016

Tiny refactoring of some unneeded code.

@DarrylBayliss DarrylBayliss changed the title Remove unneeded CFStringRef allocations. Remove unneeded CFStringRef allocations in CFURL. Jan 2, 2016
CFStringRef substring = CFStringCreateWithSubstring(alloc, originalString, CFRangeMake(mark, percentRange.location - mark));
CFStringAppend(newStr, substring);
CFStringAppend(newStr, CFStringCreateWithSubstring(alloc, originalString, CFRangeMake(mark, percentRange.location - mark)));

This comment has been minimized.

Copy link

phausler Jan 2, 2016


This is still allocating a new string and now is leaking

phausler added a commit that referenced this pull request Jan 6, 2016
Remove unneeded CFStringRef allocations in CFURL.
@phausler phausler merged commit 231dae1 into apple:master Jan 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.