blob: ab44da895a0b7364a63e9c4eda3a0f4652885ea1 [file] [log] [blame]
Austin Schuh75263e32022-02-22 18:05:32 -08001// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#include "MulticastHandleManager.h"
6
7using namespace wpi;
8
9MulticastHandleManager& wpi::GetMulticastManager() {
10 static MulticastHandleManager manager;
11 return manager;
12}
James Kuszmaulb13e13f2023-11-22 20:44:04 -080013
14#ifdef _WIN32
15MulticastHandleManager::~MulticastHandleManager() {
16 // Multicast handles cannot be safely destructed on windows during shutdown.
17 // Just leak all handles.
18 for (auto&& i : resolvers) {
19 i.second.release();
20 }
21
22 for (auto&& i : announcers) {
23 i.second.release();
24 }
25}
26#endif