Believe me, I’d love to share the link to the actual thing I am developing but unfortunately I am not able to share the actual application link or anything else related to the nature of this project as this is for a client and the company I work for is under NDA.
I did the exact thing you advised me to do, disposed geometry and material after scene.remove(prev_object), but calling dispose like prev_object.geometry.dispose() doesn’t work because prev_object doesn’t have geometry, it’s children have geometry. So doing that iteration through all of the children (from mrdoob’s answer on the SO link) and disposing their geometry and materials worked, but it still crashes on iPad.
I might have worded that “stops working” part incorrectly, it doesn’t stop working, it’s just that it runs into an error because I tried to call .dispose() on null/undefined (because prev_object doesn’t have geometry and material, but it’s children have) and any js code after that .dispose() line didn’t work. If I put console.log before and after that line the first console.log would print out, and the second one wouldn’t.