Removing and added static mesh component

Just out of curiosity, is there a way that the same event destroys another mesh object reference object reference and then adds a new static mesh component?