2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Select exception users in EditPrivacyBox.

This commit is contained in:
John Preston
2017-03-17 15:05:50 +03:00
parent 85fd117675
commit 61c5b45d7a
17 changed files with 622 additions and 227 deletions

View File

@@ -742,17 +742,15 @@ namespace internal {
namespace internal {
struct SomeAllocatedMemoryChunk {
char data[1024 * 1024];
};
std::unique_ptr<SomeAllocatedMemoryChunk> SomeAllocatedMemory;
using ReservedMemoryChunk = std::array<gsl::byte, 1024 * 1024>;
std::unique_ptr<ReservedMemoryChunk> ReservedMemory;
void InstallOperatorNewHandler() {
SomeAllocatedMemory = std::make_unique<SomeAllocatedMemoryChunk>();
ReservedMemory = std::make_unique<ReservedMemoryChunk>();
std::set_new_handler([] {
std::set_new_handler(nullptr);
SomeAllocatedMemory.reset();
t_assert(!"Could not allocate!");
ReservedMemory.reset();
Unexpected("Could not allocate!");
});
}