diff --git a/.github/actions/windows-build/action.yml b/.github/actions/windows-build/action.yml index 21de507d..246665d9 100644 --- a/.github/actions/windows-build/action.yml +++ b/.github/actions/windows-build/action.yml @@ -15,7 +15,7 @@ runs: arch: amd64 - name: Install private Swift toolchain - uses: compnerd/gha-setup-swift@main + uses: compnerd/gha-setup-swift@81f383b35a86e6e966de139be25b451d4f7dd953 with: github-repo: thebrowsercompany/swift-build github-token: ${{ inputs.GITHUB_TOKEN }} diff --git a/swiftwinrt/Resources/Support/WinRTProtocols.swift b/swiftwinrt/Resources/Support/WinRTProtocols.swift index ac6e0a51..63db419c 100644 --- a/swiftwinrt/Resources/Support/WinRTProtocols.swift +++ b/swiftwinrt/Resources/Support/WinRTProtocols.swift @@ -43,10 +43,11 @@ open class WinRTClass : CustomQueryInterface, Equatable { } deinit { - // ensure we release the identity pointer before releasing _inner. releasing the _inner - // cleans up the underlying COM object. - identity = nil + // ensure we release the _inner pointer before releasing identity. releasing the _inner + // cleans up the underlying COM object, which might be holding a reference to the identity pointer. + _inner = nil + identity = nil } }