With Unity, there are many reasons you might want to deactivate entire GameObject hierarchies in your scenes...

Maybe you don't want specific elements to be visible or executing yet.

Or maybe you're doing object pooling.

In any case, deactivating a game object effectively disables invoking the Update behavior.

And that's great, because deactivating a GameObject will save you precious CPU cycles.

However, it's not all perfect...

There's one thing we're not saving on when disabling objects: memory.

You see, keeping a direct reference to your assets will keep them loaded in memory. It doesn't really matter if they're invisible, disabled or whatever. Direct reference = memory greed.

But today I have a trick up my sleeve for you.

I'll show you how to recover the memory your disabled game objects are feeding on.

No worries, we'll make sure they get their memory back once they awake. We're not that selfish after all.