" delete intObject; //It messes up here, I think because primitive data types such as int are allocated in a different way." . . . .