Reproduction steps:
1. Open the attached project “MemoryRepro”
2. In the Project window select the “Assets/Resources/Smart Textures” folder
3. Duplicate the “Smart Texture” folder multiple times until there is about more than 254 of the same folder
4. Open “Activity Monitor” on macOS or “Task Manager” on Windows and inspect the memory usage of Unity
5. Deselect and select the same objects 6 times
6. Again inspect the memory usage of the Unity process
Expected result: Unity is using less than 2 GB of memory
Actual result: Unity memory usage is reaching about 30 GB or more
Reproducible with: 2020.3.46f1, 2021.3.9f1, 2021.3.20f1, 2022.2.9f1, 2023.1.0b6, 2023.2.0a4
Reproducible on: macOS 13.1 (Intel), Windows 10