skgrush / CavernSeer

An iPadOS and iOS application for scanning 3D spaces
MIT License
32 stars 9 forks source link

Memory safety catchups #34

Closed skgrush closed 3 years ago

skgrush commented 3 years ago

I discovered that the two UI models (GeneralRenderModel and SnapshotExportModel) were being leaked. I started using weaks and unowneds where I found them to be appropriate to try to prevent recursive references / retain cycles. Also tried to narrow down some references like passing observables where they aren't needed.

Eventually found that the UI connections of each of those models was where they were being retained.

skgrush commented 3 years ago

Some progress towards #5, but ultimately I still don't understand the uses of unowned versus weak and how I can still get loops with those.