mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-20 01:14:20 +00:00
Removed the ComponentDeletionWatcher class - use Component::SafePointer or Component::BailOutChecker instead.
This commit is contained in:
parent
28518aa834
commit
1e1e4ae848
8 changed files with 2 additions and 166 deletions
|
|
@ -28,7 +28,6 @@
|
|||
BEGIN_JUCE_NAMESPACE
|
||||
|
||||
#include "juce_Component.h"
|
||||
#include "juce_ComponentDeletionWatcher.h"
|
||||
#include "juce_Desktop.h"
|
||||
#include "windows/juce_ComponentPeer.h"
|
||||
#include "keyboard/juce_KeyListener.h"
|
||||
|
|
@ -3197,27 +3196,5 @@ bool Component::BailOutChecker::shouldBailOut() const throw()
|
|||
return safePointer1 == 0 || safePointer2 != component2;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
ComponentDeletionWatcher::ComponentDeletionWatcher (const Component* const componentToWatch_) throw()
|
||||
: componentToWatch (componentToWatch_),
|
||||
componentUID (componentToWatch_->getComponentUID())
|
||||
{
|
||||
// not possible to check on an already-deleted object..
|
||||
jassert (componentToWatch_->isValidComponent());
|
||||
}
|
||||
|
||||
ComponentDeletionWatcher::~ComponentDeletionWatcher() throw() {}
|
||||
|
||||
bool ComponentDeletionWatcher::hasBeenDeleted() const throw()
|
||||
{
|
||||
return ! (componentToWatch->isValidComponent()
|
||||
&& componentToWatch->getComponentUID() == componentUID);
|
||||
}
|
||||
|
||||
const Component* ComponentDeletionWatcher::getComponent() const throw()
|
||||
{
|
||||
return hasBeenDeleted() ? 0 : componentToWatch;
|
||||
}
|
||||
|
||||
|
||||
END_JUCE_NAMESPACE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue