mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Added Guideline Support Library as a dependency.
See https://github.com/Microsoft/GSL for information.
This commit is contained in:
@@ -748,15 +748,13 @@ namespace internal {
|
||||
};
|
||||
std::unique_ptr<SomeAllocatedMemoryChunk> SomeAllocatedMemory;
|
||||
|
||||
void OperatorNewHandler() {
|
||||
std::set_new_handler(nullptr);
|
||||
SomeAllocatedMemory.reset();
|
||||
t_assert(!"Could not allocate!");
|
||||
}
|
||||
|
||||
void InstallOperatorNewHandler() {
|
||||
SomeAllocatedMemory = std::make_unique<SomeAllocatedMemoryChunk>();
|
||||
std::set_new_handler(OperatorNewHandler);
|
||||
std::set_new_handler([] {
|
||||
std::set_new_handler(nullptr);
|
||||
SomeAllocatedMemory.reset();
|
||||
t_assert(!"Could not allocate!");
|
||||
});
|
||||
}
|
||||
|
||||
Qt::HANDLE ReportingThreadId = nullptr;
|
||||
|
Reference in New Issue
Block a user