mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-03 12:27:48 +08:00
Merge branch 'master' of https://github.com/fasiondog/hikyuu into feature/se
This commit is contained in:
commit
992d5b6119
@ -34,6 +34,9 @@
|
||||
// 启用MSVC内存泄漏检查
|
||||
#define ENABLE_MSVC_LEAK_DETECT ${ENABLE_MSVC_LEAK_DETECT}
|
||||
|
||||
// 启用内存泄漏检测,用于 linux 系统
|
||||
#define HKU_ENABLE_LEAK_DETECT ${HKU_ENABLE_LEAK_DETECT}
|
||||
|
||||
// 启用发送用户使用信息
|
||||
#define HKU_ENABLE_SEND_FEEDBACK ${HKU_ENABLE_SEND_FEEDBACK}
|
||||
|
||||
|
@ -84,6 +84,12 @@ void GlobalInitializer::clean() {
|
||||
getLatestVersion(), getLatestVersion());
|
||||
}
|
||||
|
||||
#if !HKU_ENABLE_LEAK_DETECT && not defined(MSVC_LEAKER_DETECT)
|
||||
// 未启用内存泄漏检测时,直接退出,让系统自行释放全部资源
|
||||
fmt::print("Quit Hikyuu system!\n\n");
|
||||
return;
|
||||
#endif
|
||||
|
||||
releaseGlobalTaskGroup();
|
||||
releaseScheduler();
|
||||
releaseGlobalSpotAgent();
|
||||
@ -92,8 +98,6 @@ void GlobalInitializer::clean() {
|
||||
StockManager::quit();
|
||||
DataDriverFactory::release();
|
||||
|
||||
nng_closeall();
|
||||
|
||||
#if HKU_ENABLE_HDF5_KDATA
|
||||
H5close();
|
||||
#endif
|
||||
|
@ -148,6 +148,7 @@ set_configvar("SUPPORT_TEXT_ARCHIVE", 0)
|
||||
set_configvar("SUPPORT_XML_ARCHIVE", 1)
|
||||
set_configvar("SUPPORT_BINARY_ARCHIVE", 1)
|
||||
set_configvar("ENABLE_MSVC_LEAK_DETECT", 0)
|
||||
set_configvar("HKU_ENABLE_LEAK_DETECT", get_config("leak_check") and 1 or 0)
|
||||
set_configvar("HKU_ENABLE_SEND_FEEDBACK", get_config("feedback") and 1 or 0)
|
||||
|
||||
set_configvar("HKU_ENABLE_HDF5_KDATA", get_config("hdf5") and 1 or 0)
|
||||
|
Loading…
Reference in New Issue
Block a user