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:
parent
767f63dfb0
commit
a9ad07a945
22 changed files with 344 additions and 495 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue