1
0
Fork 0
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:
jules 2016-01-27 16:03:15 +00:00
parent 256e66dfa3
commit 0294e772dd

View file

@ -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;
};