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

IDisposable Interfaces #660

Closed
scharada opened this issue May 6, 2019 · 3 comments · Fixed by #964
Closed

IDisposable Interfaces #660

scharada opened this issue May 6, 2019 · 3 comments · Fixed by #964

Comments

@scharada
Copy link

scharada commented May 6, 2019

using (var client = RestService.For(Url))
{
// code here
}

this requires the Interface to be IDisposable which makes sense , but when you make It IDisposable, it asks for a Dispose() Method.. but it's an interface .... the code generation needs to generate the appropriate Dispose call when an interface inherits from IDisposable.

@scharada scharada added the bug Something isn't working label May 6, 2019
@clairernovotny clairernovotny added bug enhancement up-for-grabs and removed bug Something isn't working bug labels May 7, 2019
@bennor
Copy link
Contributor

bennor commented Jun 8, 2019

I'm not sure it should be disposed. That would result in disposing of (or abandoning) the HttpClient instance it created, which isn't the way you're supposed to work with HttpClient.

Other than the HttpClient, there's nothing that really justifies disposal. What's the value here?

@bugproof
Copy link

Due to a bug: #449 we cannot use Refit as a singleton. There's HttpClient created for every request. Might be related.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants