#pragma once

#include "OperatingSystem.h"

namespace Framework
{
    class ReferenceCounter
    {
    private:
        CRITICAL_SECTION* cs;
        mutable int ref;

    public:
        DLLEXPORT ReferenceCounter();
        DLLEXPORT virtual ~ReferenceCounter();

        DLLEXPORT int getReferenceCount() const;
        DLLEXPORT ReferenceCounter* getThis() const;
        DLLEXPORT void* release();
    };
} // namespace Framework