Remove uWS::destroy()
This commit is contained in:
@@ -35,7 +35,4 @@ int main() {
|
||||
std::cout << "Listening on port " << 9001 << std::endl;
|
||||
}
|
||||
}).run();
|
||||
|
||||
/* This is needed to properly clear everything */
|
||||
uWS::destroy();
|
||||
}
|
||||
|
||||
@@ -11,7 +11,4 @@ int main() {
|
||||
}).run();
|
||||
|
||||
std::cout << "Failed to listen on port 3000" << std::endl;
|
||||
|
||||
/* This is needed to properly clear everything */
|
||||
uWS::destroy();
|
||||
}
|
||||
|
||||
+3
-5
@@ -84,6 +84,9 @@ public:
|
||||
if (!defaultLoop) {
|
||||
ownsDefaultLoop = true;
|
||||
defaultLoop = create(true);
|
||||
std::atexit([]() {
|
||||
Loop::defaultLoop()->free();
|
||||
});
|
||||
return defaultLoop;
|
||||
} else if (ownsDefaultLoop) {
|
||||
return defaultLoop;
|
||||
@@ -145,11 +148,6 @@ inline void run() {
|
||||
Loop::defaultLoop()->run();
|
||||
}
|
||||
|
||||
/* Helper to clean up a thead before exiting */
|
||||
inline void destroy() {
|
||||
Loop::defaultLoop()->free();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // LOOP_H
|
||||
|
||||
Reference in New Issue
Block a user