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

6164844138987523: SCNView doesn't free added gesture recognizers after deinit #21302

Open
openradar-mirror opened this issue Jul 8, 2019 · 0 comments

Comments

@openradar-mirror
Copy link

Description

CNView doesn't free added gesture recognizers after deinit. Please check out provided test case.

var wasDeallocated = false
class MyGestureRecognizer: UIGestureRecognizer {
deinit { wasDeallocated = true }
}

class Foo {
let scnView = SCNView() // test passes if change to UIView()

init() {
    scnView.addGestureRecognizer(MyGestureRecognizer(target: self, action: #selector(test)))
}

@objc func test() { }

}

final class Test: XCTestCase {
func testMemoryLeak() {
autoreleasepool {
_ = Foo()
}
XCTAssertTrue(wasDeallocated)
}
}

Product Version: 12.0
Created: 2019-07-08T21:43:41.103009
Originated: 2019-07-09T00:00:00
Open Radar Link: http://www.openradar.me/6164844138987523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant