Patent ID: 8744287

Claim:
An image forming apparatus comprising: a housing; an image holding body that is housed in the housing and holds a toner image; an image forming unit that is housed in the housing and forms the toner image on the image holding body; a cartridge that includes at least the image holding body and is removably mounted on the housing; a toner container that is removably mounted on the cartridge, houses a toner therein, and supplies the toner to the image forming unit; a retaining mechanism that retains the toner container with respect to the cartridge; a storage that is provided at a certain position of at least one of the cartridge and the toner container and stores first information relating to a use amount of the toner in the toner container and second information relating to a use amount of an image holding portion, which is a component not including the toner container and including at least the image holding body from among components installed in the cartridge; an information update unit that updates the first information in accordance with use of the toner in the toner container, and updates the second information in accordance with use of the image holding portion; an empty detector that is housed in the housing and detects whether or not the toner container is empty; a retention controller that at least allows the toner container retained by the retaining mechanism to be released if the empty detector detects that the toner container is empty, and causes the retaining mechanism to retain the toner container if the empty detector detects that the toner container is not empty; and an information rewrite unit that rewrites information stored in the storage if the empty detector detects that the toner container is empty and the toner container is at least allowed to be released, and then if the empty detector detects that the toner container is not empty, wherein the cartridge includes a supply mechanism that handles at least part of toner supply from the toner container to the image forming unit, wherein the retaining mechanism is at least partly commonly used as the supply mechanism, operated together with the supply mechanism, and provides a retained state in which the retention of the toner container is not released and a release state in which the retention is at least allowed to be released, by the operation, and wherein the retention controller also serves as a supply controller that controls the toner supply from the toner container to the image forming unit by controlling the operation of the supply mechanism.