aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2011-07-19 11:16:33 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-30 13:18:28 +0200
commit5f54b6c091ddfd69f02c4365820ac27432e87e9f (patch)
tree97ba16db65c6814e260fffadfb2b7d93a14d36e0 /src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
parente17010ea327415cb5b67b1a70bc583bb31892294 (diff)
Removed QDeclarativeJS::NodePool
Change-Id: I69d39ef005900803f6c620ea8f1ca00d054dc8d2 Reviewed-on: http://codereview.qt.nokia.com/3757 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src/declarative/qml/parser/qdeclarativejsmemorypool_p.h')
-rw-r--r--src/declarative/qml/parser/qdeclarativejsmemorypool_p.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
index 8d61dbe714..e921ac6331 100644
--- a/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
+++ b/src/declarative/qml/parser/qdeclarativejsmemorypool_p.h
@@ -93,7 +93,6 @@ public:
m_storage = reinterpret_cast<char**>(qRealloc(m_storage, sizeof(char*) * (1 + m_blockIndex)));
m_currentBlock = m_storage[m_blockIndex] = reinterpret_cast<char*>(qMalloc(m_currentBlockSize));
- ::memset(m_currentBlock, 0, m_currentBlockSize);
m_currentIndex = (8 - quintptr(m_currentBlock)) & 7; // ensure first chunk is 64-bit aligned
Q_ASSERT(m_currentIndex + bytes <= m_currentBlockSize);
@@ -126,6 +125,20 @@ private:
Q_DISABLE_COPY(MemoryPool)
};
+class QML_PARSER_EXPORT Managed
+{
+ Managed(const Managed &other);
+ void operator = (const Managed &other);
+
+public:
+ Managed() {}
+ ~Managed() {}
+
+ void *operator new(size_t size, MemoryPool *pool) { return pool->allocate(size); }
+ void operator delete(void *) {}
+ void operator delete(void *, MemoryPool *) {}
+};
+
} // namespace QDeclarativeJS
QT_QML_END_NAMESPACE