SceneKit's runAction Keeps Taking Memory Space

When using SceneKit I noticed that every single execution of "runAction" command increases memory usage of app on iPhone.

If the app runs long time it ends up crashing application.


I could not find an answer for this problem.


When I am searching solution I saw that it is an old story, the first question come up about it in 2016 and it is about to be 2020.


I tested the project I am working on last iOS and Xcode versions.


I presume it is not an easy "bug" to kill considering 4 years of existence.


But I hope someone can return with an answer or I am making an idiotic mistake and it will be pointed it out.

Answered by ucelen in 399723022

I found the reason.

Some of the nodes did not have geometry because they should not be seen.

When .runAction executed for a node without geometry it takes a bit of memory and they add up.

I've just get rid of nodes without geometry.

Accepted Answer

I found the reason.

Some of the nodes did not have geometry because they should not be seen.

When .runAction executed for a node without geometry it takes a bit of memory and they add up.

I've just get rid of nodes without geometry.

SceneKit's runAction Keeps Taking Memory Space
 
 
Q