Dear student,
The residual bodies are vesicles that contained indigestible material. They are either secrted by cell via exocytosis or become lipofuscin granules that remain in rthe cytosol. Residual bodies are formed after the digestion is over by lysoosmes , it does not contain enzymes. When lysosome is no longer able to digestthe cell organells some old useless cell organelles starts building up inside the cell. So the only way by which lysosome can get rid of these bodies is to migrate toward the cell memebrane and then eject them out of the cell.
Regards