#pragma once #include #include #include #include #include #include #include "Scheduler.h" using namespace facebook; namespace reanimated { class RuntimeManager; struct StaticStoreUser { std::atomic ctr; std::unordered_map>> store; std::recursive_mutex storeMutex; }; class StoreUser { int identifier = 0; std::weak_ptr scheduler; std::shared_ptr storeUserData; public: StoreUser(std::shared_ptr s, const RuntimeManager &runtimeManager); std::weak_ptr getWeakRef(jsi::Runtime &rt); void removeRefs(); virtual ~StoreUser(); }; } // namespace reanimated