gocoder-sdk-samples-ios icon indicating copy to clipboard operation
gocoder-sdk-samples-ios copied to clipboard

Retain cycle when starting streaming

Open a-voronov opened this issue 5 years ago • 2 comments

WowzaSDK seems to retain reference to WOWZStatusCallback when calling WowzaGoCoder.startStreaming(_:).

Following tutorials, I can pass self as a callback, but once I do, instance of my class isn't released as I'm keeping reference to WowzaSDK instance..

class Test: NSObject, WOWZStatusCallback {
    let goCoder: WowzaGoCoder.sharedInstance()!

    func stream() {
        goCoder.startStreaming(self) // here self is retained and never released
    }
}

reproduces in v1.5.1

a-voronov avatar Jul 16 '18 18:07 a-voronov