summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2015-07-02 16:26:59 +0200
committerPaul Lemire <paul.lemire@kdab.com>2015-07-04 13:17:35 +0000
commit63540eb6e763757e657d7bcfde5aaa008e3ce709 (patch)
tree18d7434f53cc3da73f45dd4b1eff9a2add9f2cdd /src/core
parenta92ca8a4e74c805a2e870e3d184405c15c69f4a8 (diff)
RenderView: remove a subtle memory leaks
- QFrameAllocator: when dealing with subclasses, the deallocate call should be made with the subclass types, otherwise not all the memory is released - RenderView::sort() properly destroy and release QUniformValue instances that have a duplicate Change-Id: Ia6becfcccf4dad471024c686fda64aef8605c4bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/resources/qframeallocator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/resources/qframeallocator.cpp b/src/core/resources/qframeallocator.cpp
index 3e83e29bf..28025f192 100644
--- a/src/core/resources/qframeallocator.cpp
+++ b/src/core/resources/qframeallocator.cpp
@@ -40,6 +40,10 @@
\brief Provides a pool of memory chunks to be used to allocate objects on a per frame basis.
The memory can be recycled by following frames by calling clear which won't deallocate any memory.
+
+ \note Be really careful when allocating polymorphic types. You must be
+ sure to call deallocate with the subclass type to properly release all
+ memory.
*/
#include "qframeallocator.h"