When using the destroy() function to remove a dialog from the dom, the shadow is not removed (if using shadow: true). It needs to be updated to include:
if (this.shadow) {
this.shadow.remove();
}

|
#2
|
|
It's not a bug. In Ext 1.0 there is a global pool of shadows shared by components that need shadows. This way if you make 10 menus and 10 dialogs you don't have 20 shadows. Instead they all share from a pool of shadows which are created/reused when needed and returned to the pool when hidden. I plan to implement a similar iframe shim pool as I think it could really help lower resource usage.
I don't recommend adding that line as it would probably break the pooling. ![]() |
本文探讨了ExtJS框架中对话框使用阴影效果时的资源管理方式。当使用destroy()函数移除对话框时,不会删除阴影效果,这是因为框架采用了一个全局阴影池来共享多个组件所需的阴影资源。这种方式有助于降低资源消耗。

被折叠的 条评论
为什么被折叠?



