How to delete a class instance

I want to free up some memory, I create classes with the new keywords that are no actors, so I dont use spawn, I have a problem how to delete em erase em from memory?


I am making a new Menu and HUD UI for the gladiators game I been working oin for 10 years, since flash is a lot of errors and bad stuff… And I am having a lot of fun with it this kind off new HUD from scratch using painting just a textures… And it is looking better so far, and my buttons are classes that are not actors, so performance is great… That is why i need to delete em. Destroy no work no… .

I believe simply removing all variable references to it will cause the Garbage Collector to delete it on next Garbage Collection

1 Like

ok makes sense it is what I do