Skip to content

Conversation

Anipik
Copy link
Contributor

@Anipik Anipik commented Aug 25, 2021

This is dangling reference and we are hitting file contetnion issues because of this while trying to use this package in aspnet core repo

Tested locally and it no longer repros

@ghost
Copy link

ghost commented Aug 25, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@Anipik Anipik requested review from ericstj and joperezr August 25, 2021 19:21
Package package = CreatePackage(packageReader, runtimeGraph);
package.PackagePath = packagePath;
return package;
using (PackageArchiveReader packageReader = new PackageArchiveReader(packagePath))
Copy link
Member

Choose a reason for hiding this comment

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

NIT: you could also just use the inline using since the scope is the variable scope anyway. Also, inside method CreatePackage we seem to be using a NuspecReader, is that disposable too? If so, does it get disposed by PackageArchiveReader.Dispose? If not we should add a using there as well.

Copy link
Contributor Author

@Anipik Anipik Aug 25, 2021

Choose a reason for hiding this comment

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

Also, inside method CreatePackage we seem to be using a NuspecReader, is that disposable too?

NuspecReader is not disposable. I will leave "using" as it for now (donot want to rekick the builds).

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Small comment left but this looks good otherwise. Good catch.

@Anipik Anipik merged commit bd37d9d into dotnet:main Aug 25, 2021
@Anipik
Copy link
Contributor Author

Anipik commented Aug 25, 2021

/backport to release/6.0.1xx-rc1

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.

2 participants