unity-wakatime
unity-wakatime copied to clipboard
Fix native collections leak on Unity v2021+
Dispose was not called on the UnityWebRequest, which in newer versions of unity causes a memory leak.
disposeUploadHandlerOnDispose defaults to true, so it will also implicitly dispose that class. This is backwards compatible to unity 2018, when the UnityWebRequest class was introduced, as it has always implement IDisposable (see: https://github.com/Unity-Technologies/UnityCsReference/blob/2018.1/Modules/UnityWebRequest/Public/UnityWebRequest.bindings.cs)
~~Actually. I don't think this fully fixes the issue. Investigating~~
False alarm, I was seeing errors relating to it from previous runs of the plugin.
Actually, this sometimes still has the issue.
I'll look into it some more
Is this going to be merged? I would love to see this bug fixed.
I would love to, but it ended up not fully fixing the issue. I haven't had time to come back and resolve it :(
I can confirm that on my machine this fixed the problem. It also wouldn't allow me to build before when I had the bug.