[Tizen] Delete callback memory when rasterize callback not processed 48/291548/1 accepted/tizen_6.5_unified accepted/tizen/6.5/unified/20230517.090737 submit/tizen_6.5/20230418.081305
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 18 Apr 2023 03:52:06 +0000 (12:52 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Tue, 18 Apr 2023 07:01:01 +0000 (16:01 +0900)
When Rasterize callback register into VectorAnimationManager, and
visual was destroyed, the callback base memory might not be deleted.

Change-Id: Ia2d09856e989ac29f8c39cd5cabb2af29d1ed80d
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-toolkit/internal/visuals/animated-vector-image/vector-animation-manager.cpp

index f23439d..fef8167 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 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.
@@ -109,6 +109,9 @@ void VectorAnimationManager::UnregisterEventCallback(CallbackBase* callback)
   {
     mEventCallbacks.erase(iter);
 
+    // Delete callback base memory
+    delete callback;
+
     if(mEventCallbacks.empty())
     {
       if(Adaptor::IsAvailable())