1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a method ValueTree::getReferenceCount()

This commit is contained in:
jules 2014-06-11 16:30:28 +01:00
parent 8be86285b0
commit 5587c16d78
2 changed files with 10 additions and 0 deletions

View file

@ -789,6 +789,11 @@ void ValueTree::copyPropertiesFrom (const ValueTree& source, UndoManager* const
object->copyPropertiesFrom (*(source.object), undoManager);
}
int ValueTree::getReferenceCount() const noexcept
{
return object != nullptr ? object->getReferenceCount() : 0;
}
//==============================================================================
class ValueTreePropertyValueSource : public Value::ValueSource,
private ValueTree::Listener

View file

@ -490,6 +490,11 @@ public:
*/
static const ValueTree invalid;
/** Returns the total number of references to the shared underlying data structure that this
ValueTree is using.
*/
int getReferenceCount() const noexcept;
private:
//==============================================================================
JUCE_PUBLIC_IN_DLL_BUILD (class SharedObject)