So casting isn’t inherently bad, see the post above for examples of when it’s a non-issue. And sometimes it’s not really avoidable, like creating a widget. You have to load the class in order to instantiate it, so you may as well save the reference.
Saving a reference and casting to a class have the same load overhead. In that case it doesn’t matter which you choose. However it does take CPU time to cast to something even if it’s loaded into memory, so if you must cast it makes the most sense to cast once and save the reference. A pointer to another object doesn’t take up much memory after the initial load, so go nuts. But do try to avoid casts if possible. Interfaces are great for this.