Move instance calculation to raw pointer classes.