[iOS] Fix memory leak in FeatureCounter
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jan 2015 22:35:56 +0000 (22:35 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Jan 2015 22:35:56 +0000 (22:35 +0000)
commit8cbf2e78a04e3330d4ca45ee12059ac92cfacff3
tree62a4be7724118503563ea888ba539abccb71fe07
parentc82985327d7c6b53d62795723eb4cf58580c6f93
[iOS] Fix memory leak in FeatureCounter
https://bugs.webkit.org/show_bug.cgi?id=140029
<rdar://problem/19255690>

Reviewed by Darin Adler.

Fix memory leak in FeatureCounter. The NSString for the counter key
was allocated but never released. The patch switches to using a
RetainPtr instead of a raw pointer to avoid the issue.

* platform/ios/FeatureCounter.mm:
(WebCore::FeatureCounter::incrementKey):
(WebCore::FeatureCounter::setKey):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/FeatureCounter.mm