JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce_LeakedObjectDetector.h File Reference
This graph shows which files directly or indirectly include this file:

Classes

class  juce::LeakedObjectDetector< OwnerClass >
 Embedding an instance of this class inside another class can be used as a low-overhead way of detecting leaked instances. More...
 
class  juce::LeakedObjectDetector< OwnerClass >::LeakCounter
 

Namespaces

 juce
 

Macros

#define JUCE_LEAK_DETECTOR(OwnerClass)
 This macro lets you embed a leak-detecting object inside a class. More...
 

Macro Definition Documentation

◆ JUCE_LEAK_DETECTOR

#define JUCE_LEAK_DETECTOR (   OwnerClass)
Value:
friend class juce::LeakedObjectDetector<OwnerClass>; \
static const char* getLeakedObjectClassName() noexcept { return #OwnerClass; } \
juce::LeakedObjectDetector<OwnerClass> JUCE_JOIN_MACRO (leakDetector, __LINE__);

This macro lets you embed a leak-detecting object inside a class.

To use it, simply declare a JUCE_LEAK_DETECTOR(YourClassName) inside a private section of the class declaration. E.g.

class MyClass
{
public:
MyClass();
void blahBlah();
private:
};
See also
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR, LeakedObjectDetector
juce::LeakedObjectDetector::getLeakedObjectClassName
static const char * getLeakedObjectClassName()
Definition: juce_LeakedObjectDetector.h:99
JUCE_JOIN_MACRO
#define JUCE_JOIN_MACRO(item1, item2)
A good old-fashioned C macro concatenation helper.
Definition: juce_PlatformDefs.h:199
JUCE_LEAK_DETECTOR
#define JUCE_LEAK_DETECTOR(OwnerClass)
This macro lets you embed a leak-detecting object inside a class.
Definition: juce_LeakedObjectDetector.h:133
juce::LeakedObjectDetector
Embedding an instance of this class inside another class can be used as a low-overhead way of detecti...
Definition: juce_LeakedObjectDetector.h:42