//this function will be called in the OnApplicationQuit function in Manager -- will destroy all the streams public void DestroyAllStreams() { liblsl.dll.lsl_destroy_outlet(lslRightHandOutlet.handle()); liblsl.dll.lsl_destroy_outlet(lslHeadOutlet.handle()); liblsl.dll.lsl_destroy_outlet(lslLeftHandOutlet.handle()); foreach (var a in lslHeadInlet) { liblsl.dll.lsl_destroy_inlet(a.handle()); } foreach (var a in lslLeftHandInlet) { liblsl.dll.lsl_destroy_inlet(a.handle()); } foreach (var a in lslRightHandInlet) { liblsl.dll.lsl_destroy_inlet(a.handle()); } liblsl.dll.lsl_destroy_streaminfo(lslHeadInfo.handle()); liblsl.dll.lsl_destroy_streaminfo(lslRightHandInfo.handle()); liblsl.dll.lsl_destroy_streaminfo(lslLeftHandInfo.handle()); }