From bcac50b362ff6793ab1ea7f236cf8aec515752cb Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 22 May 2015 22:01:25 -0700 Subject: [PATCH] verify that entityitem cleanup is happening correctly --- libraries/entities/src/EntityTreeElement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityTreeElement.cpp b/libraries/entities/src/EntityTreeElement.cpp index 1cc590a59b..5a59636fe7 100644 --- a/libraries/entities/src/EntityTreeElement.cpp +++ b/libraries/entities/src/EntityTreeElement.cpp @@ -643,7 +643,9 @@ void EntityTreeElement::cleanupEntities() { EntityItemPointer entity = (*_entityItems)[i]; entity->_element = NULL; - // FIX ME!!! -- maybe this is correct + // NOTE: We explicitly don't delete the EntityItem here because since we only + // access it by smart pointers, when we remove it from the _entityItems + // we know that it will be deleted. //delete entity; } _entityItems->clear();