diff --git a/modules/juce_core/memory/juce_OptionalScopedPointer.h b/modules/juce_core/memory/juce_OptionalScopedPointer.h index fd0d5f6a54..46fa34cd50 100644 --- a/modules/juce_core/memory/juce_OptionalScopedPointer.h +++ b/modules/juce_core/memory/juce_OptionalScopedPointer.h @@ -180,6 +180,12 @@ private: //============================================================================== ScopedPointer 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&) JUCE_DELETED_FUNCTION; };