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

Memory leak #159

Open
gvuyk opened this issue Jul 26, 2023 · 1 comment
Open

Memory leak #159

gvuyk opened this issue Jul 26, 2023 · 1 comment

Comments

@gvuyk
Copy link

gvuyk commented Jul 26, 2023

FPS decreases dramatically while on editor,
Unity reports this when the game stops:

A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Unity.Collections.NativeArray`1:.ctor(Byte[], Allocator) (at /home/bokken/buildslave/unity/build/Runtime/Export/NativeArray/NativeArray.cs:69)
UnityEngine.Networking.UploadHandlerRaw:.ctor(Byte[]) (at /home/bokken/buildslave/unity/build/Modules/UnityWebRequest/Public/UploadHandler/UploadHandler.bindings.cs:95)
UnityEngine.Networking.UnityWebRequest:SetupPost(UnityWebRequest, WWWForm) (at /home/bokken/buildslave/unity/build/Modules/UnityWebRequest/Public/WebRequestExtensions.cs:206)
UnityEngine.Networking.UnityWebRequest:Post(String, WWWForm) (at /home/bokken/buildslave/unity/build/Modules/UnityWebRequest/Public/WebRequestExtensions.cs:184)
mixpanel.<SendData>d__18:MoveNext() (at Library/PackageCache/com.mixpanel.unity@d8c94bb354/Mixpanel/Controller.cs:163)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr) (at /home/bokken/buildslave/unity/build/Runtime/Export/Scripting/Coroutines.cs:17)
@gvuyk
Copy link
Author

gvuyk commented Jul 27, 2023

It seems the memory leak comes from using UnityWebRequest with the obsolete WWWForm. I've replaced it with a Dictionary<string, string> and it seems to work fine.

Original FPS drop was caused by an unrelated issue

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

No branches or pull requests

1 participant