How to release memory created by SKTexture

ساخت وبلاگ

Vote count: 0

I have an application that creates scene kit textures using the following:

 let texture = SKTexture(image: image)

The problem is that after several calls, the application crashes due to low memory.

I really only need the most recently created texture so when creating a new one, the old one's memory can be released, however, Scene Kit seems to be holding on to these textures even when they aren't being used anymore (the nodes are no longer part of the scene).

How can I manually tell Scene Kit to release the memory and cache of the texture so I don't get into the low memory crashing situation?

asked 37 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 266 تاريخ : پنجشنبه 14 مرداد 1395 ساعت: 5:32