Stellar mass loss
Stellar mass loss is a phenomenon observed in stars. All stars lose some mass over their lives at widely varying rates. Triggering events can cause the sudden ejection of a large portion of the star's mass. Stellar mass loss can also occur when a star gradually loses material to a binary companion or into interstellar space. Causes. A number of factors can contribute to the loss of mass in giant stars, including: Solar wind. The Sun, a low-mass star, loses mass due to the solar wind at a very small rate, solar masses per year . Gravitational mass loss. Often when a star is a member of a pair of close-orbiting binary stars, the tidal attraction of the gasses near the center of mass are sufficient to pull gas from one star onto its partner. This effect is especially prominent when the partner is a white dwarf, neutron star, or black hole. Mass ejection. Certain classes of stars, especially Wolf-Rayet stars are sufficiently massive and distended that their hold on their upper layers is rather weak. Often, events such as solar flares and coronal mass ejections will then be sufficiently powerful to blast some  of the upper material into space. Red giant mass loss. Stars which have entered the red giant phase are notorious for rapid mass loss. As above, the gravitational hold on the upper layers is weakened, and they may be shed into space by violent events such as the beginning of a helium flash in the core. The final stage of a red giant's life will also result in prodigious mass loss as the star loses its outer layers to form a planetary nebula.