/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
QT_BEGIN_NAMESPACE
-QT_MODULE(Declarative)
class QDeclarativeRefCount
{
QDeclarativeRefCount::~QDeclarativeRefCount()
{
- Q_ASSERT(refCount == 0);
+ Q_ASSERT(refCount.load() == 0);
}
void QDeclarativeRefCount::addref()
{
- Q_ASSERT(refCount > 0);
+ Q_ASSERT(refCount.load() > 0);
refCount.ref();
}
void QDeclarativeRefCount::release()
{
- Q_ASSERT(refCount > 0);
+ Q_ASSERT(refCount.load() > 0);
if (!refCount.deref())
destroy();
}