Dynamically loaded prefab serious bug

Hi,

I would like to inform you that there is a bug (Memory leakage and maybe other stuff)

How to recreate:

  1. create a prefab with some resource and add a widget component to it. (in top node of the prefab)
  2. in a schedule loop, add this “instantiated” prefab as a node to another managed node. (and occasional remove, all added nodes,)
  3. as you will see the resources are not released when removing these added “instantiated” nodes.

Can crush your program very fast.
Regards
David.

What about demo?

Here is a link to a minimalist demo program I made:

How did you remove the nodes?

You should call node.destroy() to remove it form Cocos.

Refer to this

Thanks!