How does a CVR / FDR determine when to stop recording?
The CVR and FDR have impact switches to stop recording when they experience high acceleration. In incidents and accidents that don't involve high enough acceleration, the plane remains intact enough for the boxes to be immediately found and switched off manually. In more serious crashes, the boxes stop recording because of the physical destruction of everything but the memory units (only the memory units are built to survive crashes).