Hi, for unit-testing and debugging it would be very helpful if the the current RefCount is available to the public.
int getRefCount() const noexcept
{
return getSharedObjectHolder().refCount;
};
Why? In my current use case i want to make sure, that in my audio-callback a SharedResource is already initialized.
void audioCallback()
{
OtherClass otherClass;
otherClass.otherProcedureWhichIsUsingASharedResource()
void OtherClass::otherProcedureWhichIsUsingASharedResource()
{
// Please make sure that this SharedResource is already
// initialized before entering the audioCallback
SharedResourcePointer<MySharedResource> sharedResource
jassert(sharedResource.getRefCount()>1);
