Creator 1.4 - Performance problem with Layout

Testlayout.zip (124.4 KB)

Hi guys, have attached a test scene for layout.

I encountered a problem with using the layout component, if you continuously add and remove child to a node with layout, sooner or later, the frame rate would drop drastically on iOS devices. Is this a known issue?

1 Like

I’m experiencing a similar situation. It’s also freezing simulator on Cocos Creator aftert a while. FYI, I’m not adding any extra retains.

Ok, a bit of an update on this issue, I looked through the code in cc Layout, and it seems that events are attached to the children node. Apparently these events are not removed from the event manager. However, if you get the child to call targetoff on the the layout component, then everything would be fine again.

Or you could destroy the child node that was added to the layout, that would work too.