Should i destroy created GameObjects and Assets after tests in method with TearDown attribute to avoid memory leaks? Or they will be destroyed automatically by Unity after tests?
I know that in method decorated with Teardown i should dispose all disposable objects, close opened connections, etc. But how it goes with Objects/Assets instantiation in tests or in method decorated with SetUp attribute? I couldn't find any info about it.
When testing in Unity i did not found any differences between not destroying instantiated Objects/Assets and destroying them in method with TearDown attribute. But i don't know how Unity handles objects instantiated during tests if they won't be destroyed so maybe someone knows how it exactly works?
Aucun commentaire:
Enregistrer un commentaire