Skip to content

[SR-4036] Memory leak with String.cString(using: Encoding) #3885

Open
@pushkarnk

Description

@pushkarnk
Previous ID SR-4036
Radar rdar://problem/73153090
Original Reporter @pushkarnk
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 1
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 342a1be011db14a8a68d02d0d35c641e

Issue Description:

This code leaks memory

for i in 1...100000 {
    let s: String = "test\(i)"
    let c = s.cString(using: .utf8)
    print(c)
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions