Post

Replies

Boosts

Views

Activity

AVSampleBufferDisplayLayerContentLayer memory leaks.
I noticed that AVSampleBufferDisplayLayerContentLayer is not released when the AVSampleBufferDisplayLayer is removed and released. It is possible to reproduce the issue with the simple code: import AVFoundation import UIKit class ViewController: UIViewController { var displayBufferLayer: AVSampleBufferDisplayLayer? override func viewDidLoad() { super.viewDidLoad() let displayBufferLayer = AVSampleBufferDisplayLayer() displayBufferLayer.videoGravity = .resizeAspectFill displayBufferLayer.frame = view.bounds view.layer.insertSublayer(displayBufferLayer, at: 0) self.displayBufferLayer = displayBufferLayer DispatchQueue.main.asyncAfter(deadline: .now() + 1) { self.displayBufferLayer?.flush() self.displayBufferLayer?.removeFromSuperlayer() self.displayBufferLayer = nil } } } In my real project I have mutliple AVSampleBufferDisplayLayer created and removed in different view controllers, this is problematic because the amount of leaked AVSampleBufferDisplayLayerContentLayer keeps increasing. I wonder that maybe I should use a pool of AVSampleBufferDisplayLayer and reuse them, however I'm slightly afraid that this can also lead to strange bugs. Edit: It doesn't cause leaks on iOS 18 device but leaks on iPad Pro, iOS 17.5.1
2
0
180
1w
Xcode Organizer, Insufficient terminations data available when no filter applied.
Organizer Terminations tab shows "Insufficient terminations data available" when there's no filter applied: iPhone (All). However it shows data when I explicitly select a device type. This particular app has more users than other apps for which this tab works OK. It used to work fine but stopped working a couple of months ago. The Xcode version doesn't matter (I tried Xcode 14.3.1, Xcode 15.1 and Xcode 15.2). Please check attached screenshot. Thank you.
0
0
535
Mar ’24
When and why SKPaymentQueue.default().storefront is `nil` in release builds, all iOS versions
In our app we fetch the storefront country code: SKPaymentQueue.default().storefront?.countryCode We were not sure if all users will have this property available and we track to Bugsnag when this is nil. It turned out that over 6k users don't have this property available (shortly after the release) the number is larger than we expected. Looks like it affects all iOS versions (87 iOS versions from iOS 13.x to iOS 17.x) and models (95 in our case). It is not clear when and why this would be nil. It is not related to internet availability or to the timing of calls (e.g. it happens shortly after the app starts or hours after the app was started). So, when and why would the SKPaymentQueue.default().storefront be nil`? Thanks!
0
1
516
Feb ’24