草庐IT

CGContextRef

全部标签

swift - 你需要在 Swift 中释放 CGContextRef 吗?

我使用CGBitmapContextCreate创建了一个上下文。我需要使用CGContextRelease来发布它吗?我知道在Objective-C中答案是肯定的,但在Swift中呢?谢谢! 最佳答案 CFTypes是自动管理的,除非明确指定为非托管。根据文档。https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/WorkingWithCocoaDataTypes.htmlCoreFoundationobje