Stellar mass loss is a phenomenon that occurs in massive stars. This phenomenon is observed when a big portion of the mass of a star is triggered by specific events. Stellar mass loss happen can also when a giant star loses its material little by little into interstellar space or due to binary companion.
Stellar mass loss in massive stars can be caused by different contributing factors such as a binary companion’s gravitational attraction, coronal mass ejection and ascension of a star into the status of a red giant or red supergiant.
Gravitational mass loss usually happens to one of the binary stars which are closely orbiting to one another. The proximity of the pair can cause tidal attractions which is enough to pull gas from the partner star. Stellar mass loss due to gravitational attraction is more prominent when one of the binary stars is a neutron star, a white dwarf or a black hole.
Mass ejection on the other hand happens when a massive star is a bit weak to hold its upper layer. Stellar mass loss may happen after events like solar flares and coronal mass ejections occur. These events are powerful enough to blast part of the materials of the upper layer into space.