Hello developers, I am currently encountering a major memory problem in my app which is using RealityKit.
App-Structure:
Six different tabs, each containing a button which opens a fullscreenCover containing the ARView. Each tab loads in 2 models at once, it's so you can toggle the second model, because it's an optional feature.
The models:
The models are around 20-65MB with, at max, 500k Polygons. Further polygon reduction leads to the models being unrecognizable, so can't do that really.
The exact Problem I am encountering:
When the app starts up it uses around 50MB of memory, when I launch an ARView it jumps to around 700MB of memory. When I then launch another ARView from a different Tab, the memory has a short peak at 1GB it then goes back to 700MB. When I launch another ARView it peaks again at 1GB and as soon as the model loads in (gets placed down), or sometimes even straight up at the startup of the ARView the app crashes with the error "EXC_BAD_ADDRESS (code=1, address=0x0)".