Skip to content

[SR-4666] Dictionary bridge is leaking memory #47243

@palimondo

Description

@palimondo
mannequin
Previous ID SR-4666
Radar rdar://problem/31788785
Original Reporter @palimondo
Type Bug
Status Resolved
Resolution Done
Environment

swift[master] at the time of report

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug, Leak
Assignee @aschwaighofer
Priority Medium

md5: 18d4ac6029a7d7afaf3318f44c1c2f65

relates to:

  • SR-4667 Array is probably leaking memory
  • SR-4668 NSStringRef is probably leaking memory

Issue Description:

Running DictionaryBridge performance test from Swift Benchmark Suite reveals a massive memory leak:

$ /usr/bin/time -lp $BUILD/bin/Benchmark_O --num-samples=1 DictionaryBridge
[...]
  17301504  maximum resident set size
[...] 
$ /usr/bin/time -lp $BUILD/bin/Benchmark_O --num-samples=3 DictionaryBridge
#,TEST,SAMPLES,MIN(us),MAX(us),MEAN(us),SD(us),MEDIAN(us)
[...]
  33226752  maximum resident set size
[...]
$ /usr/bin/time -lp $BUILD/bin/Benchmark_O --num-samples=20 DictionaryBridge
[...]
 137551872  maximum resident set size
number of iterations MAX_RSS
1 17 MB
3 33 MB
20 137 MB

Same problem manifests when running benchmarks for ObjectiveCBridgeToNSDictionary and ObjectiveCBridgeToNSSet.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.memory leakbug: Memory leakstandard libraryArea: Standard library umbrella

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions