ExtJs 4, what is the right way to Delete control from container and Remove it from the memory?

纵饮孤独 提交于 2019-12-12 19:18:55

问题


The question is simple but i can't find a good and clear answer for it.

What is the right way to:

  1. Delete control from container
  2. Remove it from the memory, in ExtJs 4?

回答1:


Ext.AbstractContainer.remove method can't be far off.

remove( Component/String component, [Boolean autoDestroy]) : Void

Removes a component from this container. Fires the beforeremove event before removing, then fires the remove event after the component has been removed. Parameters

  • component : Component/String The component reference or id to remove.

  • autoDestroy : Boolean (optional) True to automatically invoke the removed Component's Ext.Component.destroy function. Defaults to the value of this Container's autoDestroy config.



来源:https://stackoverflow.com/questions/5699969/extjs-4-what-is-the-right-way-to-delete-control-from-container-and-remove-it-fr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!