| 593 | } |
| 594 | |
| 595 | MemoryLeakWarningPlugin::MemoryLeakWarningPlugin(const SimpleString& name, MemoryLeakDetector* localDetector) : |
| 596 | TestPlugin(name), ignoreAllWarnings_(false), destroyGlobalDetectorAndTurnOfMemoryLeakDetectionInDestructor_(false), expectedLeaks_(0) |
| 597 | { |
| 598 | if (firstPlugin_ == NULLPTR) firstPlugin_ = this; |
| 599 | |
| 600 | if (localDetector) memLeakDetector_ = localDetector; |
| 601 | else memLeakDetector_ = getGlobalDetector(); |
| 602 | |
| 603 | memLeakDetector_->enable(); |
| 604 | } |
| 605 | |
| 606 | MemoryLeakWarningPlugin::~MemoryLeakWarningPlugin() |
| 607 | { |