https://stackoverflow.com/questions/50689859/download-large-file
Download large file
By downloading a file with UnityEngine.WWW, I get the error OverflowException: Number overflow. I found out the error is caused form the structure itself, because the byte-array has more bytes ...
stackoverflow.com
https://forum.unity.com/threads/uwp-memory-leak-when-downloading-large-files.765122/#post-5103632
UWP: Memory leak when downloading large files
The following code run on UWP will raise the memory by 100MB every iteration until the application crashes. What am I missing here? We're seeing...
forum.unity.com
위 두 링크의 내용을 축약하면..
UnityWebRequest를 사용하여 텍스쳐를 다운로드를 한 후, 다운로드된 리소스를 처리하기 위해 직접 www.downloadHandler.data에 Access 하게 되면, 리턴을 위해 내부에서 새로운 바이트 배열이 생성되므로 메모리 관리에 매우 취약하다는 내용.
첫 번째 링크처럼 만약 다운로드한 리소스를 파일로 저장하거나 특정 목적으로 사용할 경우 그에 맞는 downloadHandler를 전송 전에 할당하여 처리할 수 있도록 해야 함.
'Unity > 메모리관리' 카테고리의 다른 글
GC 로깅 (메모리 단편화 추정될때) (0) | 2018.05.15 |
---|---|
itween은 되도록 자제... (0) | 2014.08.12 |
유니티에서의 메모리 관리 (0) | 2014.04.28 |
유니티 메모리 관리 4 (마지막) (2) | 2013.10.16 |
유니티 메모리 관리 3 (0) | 2013.10.16 |
WRITTEN BY