ref/unref:
/** Set whether reference counting should be use a mutex to create thread reference counting.*/
static void setThreadSafeReferenceCounting(bool enableThreadSafeReferenceCounting);
/** Get whether reference counting is active.*/
static bool getThreadSafeReferenceCounting();
associated variables which were only compiled in on debug build. These optional
methods/static vars were causingproblems when mixing debug and release builds.