Fixed memory leaks in real-time workflow segmentation.