Spawn and Destroy VS Spawn and Re-use

Is it better To Spawn an actor then destroy it over and over
OR
Spawn an actor once and re-use it with extra code to hide and show it.

This question is entirely for optimization reasons.

For my purpose these actors are spawned and destroyed infrequently (1-6 Seconds), spawn and destroy is a lot easier and cleaner to work with however it feels wrong.
(More Specifically It’s for “Add Actor Comp Child”)

Is it better To Spawn an actor then
destroy it over and over OR Spawn an
actor once and re-use it with extra
code to hide and show it.

It’s generally better to reuse but…


If it’s only several actors and it’s only every other second or so and you feel it makes it cleaner, easier to organise and maintain, that’s the way I’d lean - Destroy/Spawn.


Object Pooling is a thing for a reason. It’d make sense to employ it if performance was paramount; it’s worth it providing you need a large enough pool to justify the upfront cost of setting it up.

1 Like