Steps to reproduce:
- Open any Project
- Navigate to Edit > Project Settings > UI Toolkit
- In the "Project Preview Theme" section open the dropdown menu for "Editor (for Editor Extension Authoring)" and switch to any of the options
- Keep switching different themes for "Editor (for Editor Extension Authoring)" until the "Hold on" pop up appears
Actual results: Switching options for Editor (for Editor Extension Authoring) consecutively takes longer with each switch of the options, indicating a leak or no cleanup
Expected results: Switching Project Settings options does not take longer with each switch
Reproducible with versions: 6000.4.0a5, 6000.5.0a2
Not reproducible with versions: 6000.0.63f1, 6000.2.14f1, 6000.3.0f1 (No Project Settings for Project Preview Theme)
Tested on (OS): Windows 11
Note: Switching the options in Play Mode might hang the Editor for longer than 5 minutes