|
|
@@ -45,12 +45,21 @@ |
|
|
|
#define CARLA_LEAK_DETECTOR(ClassName) \ |
|
|
|
friend class ::LeakedObjectDetector<ClassName>; \ |
|
|
|
static const char* getLeakedObjectClassName() noexcept { return #ClassName; } \ |
|
|
|
::LeakedObjectDetector<ClassName> CARLA_JOIN_MACRO(leakDetector, __LINE__); |
|
|
|
::LeakedObjectDetector<ClassName> leakDetector; |
|
|
|
|
|
|
|
#define CARLA_LEAK_DETECTOR_NAME(ClassName, leakDetectorName) \ |
|
|
|
friend class ::LeakedObjectDetector<ClassName>; \ |
|
|
|
static const char* getLeakedObjectClassName() noexcept { return #ClassName; } \ |
|
|
|
::LeakedObjectDetector<ClassName> leakDetectorName; |
|
|
|
|
|
|
|
#define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ClassName) \ |
|
|
|
CARLA_DECLARE_NON_COPY_CLASS(ClassName) \ |
|
|
|
CARLA_LEAK_DETECTOR(ClassName) |
|
|
|
|
|
|
|
#define CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR_NAME(ClassName, leakDetectorName) \ |
|
|
|
CARLA_DECLARE_NON_COPY_CLASS(ClassName) \ |
|
|
|
CARLA_LEAK_DETECTOR_NAME(ClassName, leakDetectorName) |
|
|
|
|
|
|
|
//============================================================================== |
|
|
|
/** |
|
|
|
Embedding an instance of this class inside another class can be used as a low-overhead |
|
|
|