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
[SR-9493] NSAttributedString Leaks #3574
Labels
Comments
Comment by Mahdi Makhdumi (JIRA)
let data = "<p>test</p>".data(using: .utf8)!
autoreleasepool {
_ = try! NSAttributedString(data: data, options: [.documentType: NSAttributedString.DocumentType.html], documentAttributes: nil)
} |
You're supposed to put the autorelease pool inside the loop, but even so. |
Comment by Mahdi Makhdumi (JIRA) yeah it's the loop body, got leaks anyway. |
Hey, Is there a solution for this ? |
Waiting for solution as well. This breaks the purpose of instrumentation. |
Its been 4 years. No solution yet? |
Any workaround or solutions to fix the memory leak |
Any workaround? |
Is there any solution? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attachment: Download
Environment
macOS High Sierra 10.13.6
Xcode version 10.1
Additional Detail from JIRA
md5: 2d60476a48e451a1c7db0c786d26aab1
Issue Description:
I'm trying to convert html to string using NSAttributedString, everything works fine, but I found that using this initializer causes a leaks in memory.
What I've tried at first:
Result:
after doing some research, I taught maybe autoreleasepool can fix it, so I've tried again:
Result: again I got leaks.
The text was updated successfully, but these errors were encountered: