Initialize ptr in constructor of handler
This commit is contained in:
parent
5a7db8fd09
commit
e063957eb6
1 changed files with 1 additions and 3 deletions
|
@ -76,7 +76,7 @@ namespace SC_AM_Internal {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stats::Stats() : malloced_list_head(nullptr), malloced_list_tail(nullptr), recursive_mutex(nullptr) {
|
Stats::Stats() : malloced_list_head(nullptr), malloced_list_tail(nullptr), deferred_node(nullptr), recursive_mutex(nullptr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stats::initialize() {
|
void Stats::initialize() {
|
||||||
|
@ -89,8 +89,6 @@ namespace SC_AM_Internal {
|
||||||
malloced_list_head->data = nullptr;
|
malloced_list_head->data = nullptr;
|
||||||
malloced_list_tail->data = nullptr;
|
malloced_list_tail->data = nullptr;
|
||||||
|
|
||||||
deferred_node = nullptr;
|
|
||||||
|
|
||||||
recursive_mutex = real_malloc(sizeof(std::recursive_mutex));
|
recursive_mutex = real_malloc(sizeof(std::recursive_mutex));
|
||||||
void *unused = new(recursive_mutex) std::recursive_mutex{};
|
void *unused = new(recursive_mutex) std::recursive_mutex{};
|
||||||
(void)unused;
|
(void)unused;
|
||||||
|
|
Loading…
Reference in a new issue