destroy() bug in 1.0 alpha3 rev2 - Ext JS

本文探讨了ExtJS框架中对话框使用阴影效果时的资源管理方式。当使用destroy()函数移除对话框时,不会删除阴影效果,这是因为框架采用了一个全局阴影池来共享多个组件所需的阴影资源。这种方式有助于降低资源消耗。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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();
}
Reply With Quote
  #2  
Old 03-09-2007, 04:20 PM
Default

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.
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值