depends on the situation, there are tons of ways to handle it
for example in one of my projects there was only 1 master weapon blueprint and to change weapons we just swapped the mesh and some settings so we did not have to destroy or spawn anything, but on the other hand if you want the weapons to be visible ont he player (like on their back or something) then your gonna want to spawn them.
then it depends on how many weapons you play to have in the inventory
1-4 i say it would be fine to spawn them all (look at gears and halo) but
lets say you make a dark souls type inventory with 100 weapons on the character at all times then you would be better off only spawning whats needed to doing what i posted earlier
One is keep your current implementation but directly after spawning the actor, set the actor to hidden in game. This is what I do (in blueprints). Then just set the actor to visible on equip and hidden on unequip.
The second option is to change your inventory to reference objects instead of actors. The objects would hold all the values (what class, number of bullets, etc.) necessary to spawn the actor. And then only spawn the actor on equip and destroy the actor on unequip. The difficulty here is making sure the objects in the inventory are updated based on what has happened. For example, if you have a gun out and shoot a few bullets, and then unequip, the object in the inventory should know that there are less bullets in the gun. This could open up a whole new can of worms in terms of problems and replication, so you might be better off with option one.
I do something similar in my current project. That might make me biased, but I think keeping them as actors and just hiding them is, in general, a better idea. If you destroy them, you’ll have to make new ones every single time the player equips a different weapon. It’s not super expensive, I suppose, but it is an extra cost. Someone can correct me if I’m wrong, but I believe hidden objects just don’t render and won’t collide, so their ongoing cost is negligible . Also, like TG said above, you would have to track any changes to the status of a weapon separately.