Loading...
Searching...
No Matches
juce::LeakedObjectDetector< OwnerClass > Class Template Reference

`#include <juce_LeakedObjectDetector.h>`

## Public Member Functions

| LeakedObjectDetector (const LeakedObjectDetector &) noexcept
LeakedObjectDetector & | operator= (const LeakedObjectDetector &) noexcept=default

## Detailed Description

template<class OwnerClass>
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.

This class keeps an internal static count of the number of instances that are active, so that when the app is shutdown and the static destructors are called, it can check whether there are any left-over instances that may have been leaked.

To use it, use the JUCE_LEAK_DETECTOR macro as a simple way to put one in your class declaration. Have a look through the juce codebase for examples, it's used in most of the classes.

Definition at line 42 of file juce_LeakedObjectDetector.h.

## Constructor & Destructor Documentation

## LeakedObjectDetector() [1/2]

template<class OwnerClass>

juce::LeakedObjectDetector< OwnerClass >::LeakedObjectDetector | ( |  | ) |

inline noexcept

Definition at line 46 of file juce_LeakedObjectDetector.h.

## LeakedObjectDetector() [2/2]

template<class OwnerClass>

juce::LeakedObjectDetector< OwnerClass >::LeakedObjectDetector | ( | const LeakedObjectDetector< OwnerClass > & |  | ) |

inline noexcept

Definition at line 47 of file juce_LeakedObjectDetector.h.

## ~LeakedObjectDetector()

template<class OwnerClass>

juce::LeakedObjectDetector< OwnerClass >::~LeakedObjectDetector | ( |  | ) |

inline

Definition at line 51 of file juce_LeakedObjectDetector.h.

The documentation for this class was generated from the following file:

- juce_LeakedObjectDetector.h