SharedResourcePointer - getRefCount()

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;
void OtherClass::otherProcedureWhichIsUsingASharedResource()
      // Please make sure that this SharedResource is already 
      // initialized before entering the audioCallback
      SharedResourcePointer<MySharedResource> sharedResource

Sure, good request, I’ll add that.

1 Like