-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Description
Previous ID | SR-2500 |
Radar | None |
Original Reporter | @karwa |
Type | Bug |
Status | Reopened |
Resolution |
Environment
Swift 5d21c2a
Additional Detail from JIRA
Votes | 1 |
Component/s | |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 87c3da070e6443586ce467201d6d37fc
Issue Description:
class A {
static let shared = A()
private init() {}
deinit { print("deinit called") }
}
print("\(A.shared)")
Output:
test.A
Expected Output:
test.A
deinit called
Basically I would expect that, at the end of the program, the singleton's deinit would be called. Am I wrong to expect that?
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.