How to reproduce:
1. Open the attached “preview_memoryleak_issue” project
2. Ensure the Inspector window is open, or that the icon size of the Project tab is large enough to display a mesh preview
3. Navigate to “_Assets/Meshes” from the Projects tab
4. Select any mesh within the folder to open it in the Inspector window, for example, “Bread top“
Expected result: The mesh is selected, and no warnings are shown
Actual result: A memory leak warning is shown in the Console window
Reproducible in: 2022.2.0a14, 2022.3.19f1, 2023.2.9f1, 2023.3.0b6
Not reproducible in: 2021.3.35f1, 2022.2.0a13
Reproducible on: Windows 10, Windows 11
Not reproducible on: No other environments tested
Notes:
- This issue only seems to reproduce once per mesh preview. When selecting the same mesh again later, or after closing and reopening the project, the issue does not reproduce. However, reimporting all assets will make the warning appear again (right-click in the Project window > “Reimport All”)
- The issue did not reproduce when exporting the same Assets to a different project, so there may also be an issue with the project itself
- The issue does not reproduce when the mesh is instantiated in the Scene as a GameObject. It is only the preview/icon of the mesh that triggers the issue