public void StopAndReleaseResources() { // Stop the cyclic thread if (this.doRun) { this.doRun = false; this.thread.Join(3000); // Timeout just for safety } // Remove us from the singleton factory participantFactory.RemoveParticipant(this.domainID, this.participantID); sendDataHandlerFactory = null; }