Cysharp / GrpcWebSocketBridge

Yet Another gRPC over HTTP/1 using WebSocket implementation, primarily targets .NET platform.
MIT License
77 stars 12 forks source link

fix: Ensure UploadHandlerRaw and DownloadHanderBuffer are disposed #13

Closed bryanmcconkey closed 1 year ago

bryanmcconkey commented 1 year ago

I ran into "A Native Collection has not been disposed" resulting from the UnityWebRequest upload/download handlers.

Fixed by using the UnityWebRequest's disposeUploadHandlerOnDispose & disposeDownloadHandlerOnDispose options to ensure the handlers are disposed of along with the UnityWebRequest.

mayuki commented 1 year ago

Thank you for your contribution! This PR looks good to me. using var is supported in C# 8 or later, so we update the requirement for Unity to 2020.3 or later.