Mandrels or cores specially adapted for heating or cooling preforms