Summary: | String::createCFString() returns a non-retained empty string | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||
Component: | Platform | Assignee: | Alexey Proskuryakov <ap> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Minor | ||||||
Priority: | P4 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Alexey Proskuryakov
2009-08-18 10:46:58 PDT
Created attachment 35051 [details]
proposed patch
Comment on attachment 35051 [details] proposed patch > + * platform/text/cf/StringCF.cpp: (WebCore::String::createCFString): Rather than retain > + CFSTR result, we can just return a new string, this doesn't seem to be a hot code path Even though it's not a hot code path it seems like we should avoid the extra memory allocation that CFStringCreateWithCharacters does compared to CFSTR. Comment on attachment 35051 [details]
proposed patch
If either solution is fine speed-wise, then why not call CFRetain to save memory in case a lot of these strings are kept around?
Committed revision 47449.
> If either solution is fine speed-wise, then why not call CFRetain to save
> memory in case a lot of these strings are kept around?
OK, changed. /me doesn't like to share objects across threads.
|