Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10813] DispatchWorkItem leak on armv7 #616

Open
swift-ci opened this issue May 31, 2019 · 1 comment
Open

[SR-10813] DispatchWorkItem leak on armv7 #616

swift-ci opened this issue May 31, 2019 · 1 comment

Comments

@swift-ci
Copy link

@swift-ci swift-ci commented May 31, 2019

Previous ID SR-10813
Radar None
Original Reporter Pogonets (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s libdispatch
Labels Bug, Leak
Assignee None
Priority Medium

md5: 5987bd4bd4977311481d967a3a2e3298

Issue Description:

We found memory leak with DispatchWorkItem on android-armv7
After a quick research, this leak doesn't reproduce on linux x86_64 and android arm64
So looks like it affects all 32bit platforms
Here is a sample:

import Dispatch

let group = DispatchGroup()
let queue = DispatchQueue.global()

class A {
    deinit {
        print("deinit")
    }
}

func test() {
    let a = A()
    queue.async(group: group, execute: DispatchWorkItem {
        print(a)
    })
}

test()
group.wait()

deinit not called
And without DispatchWorkItem this code also works fine

@belkadan
Copy link

@belkadan belkadan commented Jun 3, 2019

cc mww (JIRA User)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants