After a LoadLevelAdditive, is it possible to free up the memory? Unity docs say you can...

But, I was under the impression you can never get that memory back, so you can’t unload different parts of the world. Am I incorrect? We want to use LoadLevelAdditiveAsync exactly as described, to create a streaming world, but if you can never recover the memory, and keep exploring the world, your memory usage will just keep going up and up and up until you run out and bad things happen.

You can Destroy game objects if you no longer need them.

I thought that didn’t actually free up memory, though, until you load a full new scene (or the assets were loaded through Resources.Load and then an UnloadUnusedAssets was called).

Any ideas?

The Garbage Collector will eventually clean up objects that aren’t referenced by anything. The hard part is making sure your object isn’t referenced by anything, or referenced by something that’s referenced by something else, etc. Making sure there are no references anywhere to the object can be super hard when the code is complex and spaghetti-like.

So you’re sure that the memory is freed up? Because I’ve been told, and it’s been my experience with the profiler, that you can NEVER get memory back except in two cases: when you load a new scene, or if you are using Resources.Load and after Destroying the objects call Resources.UnloadUnusedAssets. Any assets included directly in a scene are in memory forever. I’ve had to optimize memory to get games to run on old iPad 1/iPod Touch 4, and we couldn’t clear memory any other way.

Admittedly, this time we’re targeting PC/Standalone, so maybe it’s different.