Skip to content
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

Fix FolderNameEditor memory leak on cancel #769

Merged
merged 4 commits into from Apr 16, 2019

Conversation

Projects
None yet
6 participants
@hughbe
Copy link
Contributor

hughbe commented Apr 13, 2019

Fixes #768
Fixes #770
Fixes #767

@hughbe hughbe requested a review from dotnet/dotnet-winforms as a code owner Apr 13, 2019

@hughbe hughbe force-pushed the hughbe:foldernameeditor-tests branch from c396653 to b7a8dd4 Apr 13, 2019

@weltkante
Copy link

weltkante left a comment

The double pointer on SHGetPathFromIDList looks suspicious.

@zsd4yr

This comment has been minimized.

Copy link
Member

zsd4yr commented Apr 15, 2019

@JeremyKuhne would you mind taking a look at this one as well?

@JeremyKuhne

This comment has been minimized.

Copy link
Member

JeremyKuhne commented Apr 15, 2019

Reviewing...

@JeremyKuhne
Copy link
Member

JeremyKuhne left a comment

Thanks for digging into this! Added a few more comments.

@hughbe hughbe force-pushed the hughbe:foldernameeditor-tests branch from d4f9a2c to f65f9f8 Apr 15, 2019

@codecov

This comment has been minimized.

Copy link

codecov bot commented Apr 15, 2019

Codecov Report

Merging #769 into master will increase coverage by 0.01048%.
The diff coverage is 25.86207%.

@@                 Coverage Diff                 @@
##              master        #769         +/-   ##
===================================================
+ Coverage   26.24093%   26.25141%   +0.01048%     
===================================================
  Files           1054        1057          +3     
  Lines         287909      287916          +7     
  Branches       38463       38461          -2     
===================================================
+ Hits           75550       75582         +32     
+ Misses        208380      208350         -30     
- Partials        3979        3984          +5
Flag Coverage Δ
#Debug 26.25141% <25.86207%> (+0.01048%) ⬆️
#production 17.56369% <3.05344%> (-0.00104%) ⬇️
#test 98.56541% <95.34884%> (-0.0045%) ⬇️
@JeremyKuhne
Copy link
Member

JeremyKuhne left a comment

Thanks @hughbe!

}
finally
{
ArrayPool<char>.Shared.Return(displayName);

This comment has been minimized.

Copy link
@JeremyKuhne

JeremyKuhne Apr 16, 2019

Member

Just a note for future reference. In scenarios where perf is more critical and you don't expect errors to frequently happen it is ok to not return arrays to the pool (i.e. don't need to introduce a try block).

@zsd4yr

zsd4yr approved these changes Apr 16, 2019

@zsd4yr

This comment has been minimized.

Copy link
Member

zsd4yr commented Apr 16, 2019

Thanks @hughbe and @JeremyKuhne !

@zsd4yr zsd4yr merged commit 547a013 into dotnet:master Apr 16, 2019

1 check passed

license/cla All CLA requirements met.
Details

@hughbe hughbe deleted the hughbe:foldernameeditor-tests branch Apr 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.