edbee - Qt Editor Library v0.11.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
debug_new.h
Go to the documentation of this file.
1// edbee - Copyright (c) 2012-2025 by Rick Blommers and contributors
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include <stdlib.h>
7#include <stdio.h>
8//#ifdef HAVE_MALLOC_H
9//#include <malloc.h>
10//#endif
11//#include "memoryleak.h"
12
13// #if defined(QT_DEBUG) && !defined(__MINGW32__) && defined(EDBEE_DEBUG)
14#if defined(EDBEE_DEBUG)
15 #define EDBEE_DEBUG_NEW_ACTIVE
16
17 void* debug_malloc (size_t size, const char* file, const int line);
18 void debug_free (void* p, const char* file, const int line);
19 void* operator new (size_t size, const char* file, const int line);
20 void operator delete (void* p, const char* file, const int line);
21 void operator delete (void* p) throw();
22 void* operator new[] (size_t size, const char* file, const int line);
23 void operator delete[] (void* p, const char* file, const int line);
24 void operator delete[] (void* p) throw();
25
26 #define debug_new new(__FILE__, __LINE__)
27 #define new new(__FILE__, __LINE__)
28 #define malloc(A) debug_malloc((A), __FILE__, __LINE__)
29 #define free(A) debug_free((A), __FILE__, __LINE__)
30#endif
31
32
33namespace edbee {
34 void pause_memleak_detection(bool value);
35} // edbee
36
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20
void pause_memleak_detection(bool value)
pauses the memoryleak detection
Definition debug_new.cpp:119