how does this work with static classes? do you need to delete the pointer?