Marfusios / bitmex-client-websocket

🛠️ C# client for Bitmex websocket API
Apache License 2.0
64 stars 44 forks source link

Memory leak with latest Json.NET version #14

Closed tekr closed 5 years ago

tekr commented 5 years ago

This is more a warning than anything else not to upgrade the version of Json.NET used.

Things work fine with the minimum Json.NET version currently required (11.0.2), but switching to the current version (12.0.1) results in gradual unbounded growth in memory usage when subscribed to real-time order books and trades. It appears it may be a memory leak in Json.NET.

Observed this in a .NET Core 2.1 app on both Windows and Linux.

Marfusios commented 5 years ago

Hello,

thank you for the information, is there any related issue in Json.NET Github repository?

Marfusios commented 5 years ago

There is already an issue in the Json.NET repository: https://github.com/JamesNK/Newtonsoft.Json/issues/1991

I've also fixed this memory leak in this commit: ef42676a1c91b958f5c29e49622cf2e95d726c56 Closing the issue, thanks.