Prevent accidental allocation of GC managed objects on the regular heap
authorSimon Hausmann <simon.hausmann@digia.com>
Thu, 13 Dec 2012 11:58:21 +0000 (12:58 +0100)
committerLars Knoll <lars.knoll@digia.com>
Thu, 13 Dec 2012 12:29:02 +0000 (13:29 +0100)
Make the regular new operator private. As it turns out no other changes
were required, all the existing objects are already allocated on the
GC heap, thanks to the new* factor functions in ExecutionEngine.

Change-Id: I9b69221b5bbc4491ca909ec6bb5afe0f3c010b54
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
qmljs_objects.h

index 99e29fe..965b333 100644 (file)
@@ -110,6 +110,7 @@ protected:
     virtual void getCollectables(QVector<Object *> &objects) = 0;
 
 private:
+    void *operator new(size_t);
     friend class MemoryManager;
     MemoryManager *mm;
 };