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

Public Member Functions

 LeakCounter ()=default
 ~LeakCounter ()

Public Attributes

Atomic< intnumObjects

Constructor & Destructor Documentation

◆ LeakCounter()

template<class OwnerClass>
juce::LeakedObjectDetector< OwnerClass >::LeakCounter::LeakCounter ( )
default

◆ ~LeakCounter()

template<class OwnerClass>
juce::LeakedObjectDetector< OwnerClass >::LeakCounter::~LeakCounter ( )
inline

If you hit this, then you've leaked one or more objects of the type specified by the 'OwnerClass' template parameter - the name should have been printed by the line above.

If you're leaking, it's probably because you're using old-fashioned, non-RAII techniques for your object management. Tut, tut. Always, always use std::unique_ptrs, OwnedArrays, ReferenceCountedObjects, etc, and avoid the 'delete' operator at all costs!

Member Data Documentation

◆ numObjects

template<class OwnerClass>
Atomic<int> juce::LeakedObjectDetector< OwnerClass >::LeakCounter::numObjects

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