Skip to content

Performance regression in NSMutableData[SR-3966] #890

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

Merged
merged 1 commit into from
Feb 23, 2017

Conversation

saiHemak
Copy link
Contributor

PR which addressed the memory leak in NSMutableData through #380 is missing in the latest code as well as the Swift-3.1 branch.Hence it resulted in the regression with latest code base.Please merge this on priority .


__CFDataSetNumBytesUsed(memory, 0);
__CFDataSetLength(memory, 0);
__CFDataSetInfoBits(memory, __kCFDontDeallocate);
if(isDontDeallocate) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: space after if, like line 323.


__CFDataSetNumBytesUsed(memory, 0);
__CFDataSetLength(memory, 0);
__CFDataSetInfoBits(memory, __kCFDontDeallocate);
if(isDontDeallocate) {
__CFDataSetInfoBits(memory, __kCFDontDeallocate);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Should be 4 spaces indentation.

@parkera
Copy link
Contributor

parkera commented Feb 22, 2017

@phausler please review

@saiHemak saiHemak force-pushed the nsmutabledata-branch branch from 6b8f165 to a39d6c3 Compare February 23, 2017 05:44
@saiHemak
Copy link
Contributor Author

@ianpartridge Thanks for your comments .I have addressed it

@ianpartridge
Copy link
Contributor

To be clear, this isn't a performance regression. It's a memory leak.

It was fixed in #380 and overwritten in the Sierra merge #709

@parkera There seem to have been a few issues like this. The libdispatch folks tag PRs as darwin-pending if they need to be cherry-picked into Apple internal repos. Perhaps a process like that might help avoid things like this in future?

@parkera
Copy link
Contributor

parkera commented Feb 23, 2017

@swift-ci test and merge

@parkera
Copy link
Contributor

parkera commented Feb 23, 2017

@saiHemak can you put up a PR for the swift-3.1 branch as well?

@parkera
Copy link
Contributor

parkera commented Feb 23, 2017

@ianpartridge I'll look into why this one was overwritten. The process we are following is to merge all open source changes back, then merge from the internal branch back to open source. Clearly something got missed here.

@parkera
Copy link
Contributor

parkera commented Feb 23, 2017

@swift-ci test and merge

@phausler
Copy link
Contributor

I think there was merge damage here; iirc we had a fix that was applied in both sides of the open source merge from Sierra that perhaps caused this to get clobbered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants