Add class Platform.

This commit is contained in:
XMRig 2017-08-15 03:04:46 +03:00
parent eb140fd30f
commit 61859dfe14
10 changed files with 141 additions and 25 deletions

View file

@ -36,6 +36,7 @@
#include "Mem.h"
#include "net/Network.h"
#include "Options.h"
#include "Platform.h"
#include "Summary.h"
#include "version.h"
#include "workers/Workers.h"
@ -80,6 +81,8 @@ App::App(int argc, char **argv) :
}
# endif
Platform::init();
m_network = new Network(m_options);
uv_signal_init(uv_default_loop(), &m_signal);
@ -120,10 +123,11 @@ int App::exec()
uv_loop_close(uv_default_loop());
uv_tty_reset_mode();
free(m_network);
free(m_options);
delete m_network;
Options::release();
Mem::release();
Platform::release();
return r;
}