[dali_2.3.42] Merge branch 'devel/master'
[platform/core/uifw/dali-core.git] / dali / internal / render / common / render-item.cpp
index 0ba37c3..8087053 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@ namespace
 //Memory pool used to allocate new RenderItems. Memory used by this pool will be released when shutting down DALi
 Dali::Internal::MemoryPoolObjectAllocator<Dali::Internal::SceneGraph::RenderItem>& GetRenderItemPool()
 {
-  static Dali::Internal::MemoryPoolObjectAllocator<Dali::Internal::SceneGraph::RenderItem> gRenderItemPool;
+  static Dali::Internal::MemoryPoolObjectAllocator<Dali::Internal::SceneGraph::RenderItem> gRenderItemPool(true /* Forcibly use memory pool */);
   return gRenderItemPool;
 }
 } // namespace
@@ -52,9 +52,15 @@ RenderItemKey RenderItem::NewKey()
   return RenderItemKey(key);
 }
 
+void RenderItem::ResetMemoryPool()
+{
+  GetRenderItemPool().ResetMemoryPool();
+}
+
 RenderItem::RenderItem()
 : mModelMatrix(false),
   mModelViewMatrix(false),
+  mScale(),
   mSize(),
   mRenderer{},
   mNode(nullptr),