1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Use RAII for CFTypes

This commit is contained in:
Tom Poole 2021-03-25 15:48:35 +00:00
parent 767f63dfb0
commit a9ad07a945
22 changed files with 344 additions and 495 deletions

View file

@ -304,11 +304,8 @@ private:
static String cmTimeToString (CMTime time)
{
CFStringRef timeDesc = CMTimeCopyDescription (nullptr, time);
String result = String::fromCFString (timeDesc);
CFRelease (timeDesc);
return result;
CFUniquePtr<CFStringRef> timeDesc (CMTimeCopyDescription (nullptr, time));
return String::fromCFString (timeDesc.get());
}
static String frameRateRangeToString (AVFrameRateRange* range)