mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added some safety-checking to stop people accidentally passing a ScopedPointer to an OptionalScopedPointer
This commit is contained in:
parent
256e66dfa3
commit
0294e772dd
1 changed files with 6 additions and 0 deletions
|
|
@ -180,6 +180,12 @@ private:
|
|||
//==============================================================================
|
||||
ScopedPointer<ObjectType> object;
|
||||
bool shouldDelete;
|
||||
|
||||
// This is here to avoid people accidentally taking a second owned copy of
|
||||
// a scoped pointer, which is almost certainly not what you intended to do!
|
||||
// If you hit a problem with this, you probably meant to say
|
||||
// myPointer.setOwned (myScopedPointer.release())
|
||||
void setOwned (const ScopedPointer<ObjectType>&) JUCE_DELETED_FUNCTION;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue