It is possible to cancel the production of buildings or the research of technologies. When a production or a research is canceled, the resources that had been subtracted from the planet are given back.
This can be used as a good method for saving resources. It is possible to save resources from plunder by first starting a research or production and then cancel them when the danger passes.
Note: Shipyard and defense builds can not be canceled.