Variable declaring in .cpp vs .h

Hey peeps I was wondering, and it might have already been explained in detail but I don’t remember it.
Basically I am wondering if declaring lets say Sliding speed in TickComponent() requires more resources than declaring it in .h file since you have to create it, fill it, delete it and repeat for the whole time the ticking is active.
How wrong am I with this train of thought?

Privacy & Terms