Skip to content

Commit de24f6f

Browse files
author
Ignacio Bonafonte
committed
Clean some commented code and actively clean a reference
1 parent 8c10374 commit de24f6f

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/OpenTelemetryApi/Context/ActivityContextManager.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class ActivityContextManager: ContextManager {
3535
}
3636

3737
deinit {
38-
//os_activity_scope_leave(&scope)
3938
}
4039

4140
var scope: os_activity_scope_state_s
@@ -83,17 +82,10 @@ class ActivityContextManager: ContextManager {
8382
}
8483

8584
func removeContextValue(forKey key: String, value: AnyObject) {
86-
// var parentIdent: os_activity_id_t = 0
87-
// let activityIdent = os_activity_get_identifier(OS_ACTIVITY_CURRENT, &parentIdent)
88-
// if contextMap[activityIdent] != nil {
89-
// contextMap[activityIdent]![key] = nil
90-
// if contextMap[activityIdent]!.isEmpty {
91-
// contextMap[activityIdent] = nil
92-
// }
93-
// }
9485
if let scope = objectScope.object(forKey: value) {
9586
var scope = scope.scope
9687
os_activity_scope_leave(&scope)
88+
objectScope.removeObject(forKey: value)
9789
}
9890
}
9991
}

0 commit comments

Comments
 (0)