gpt4 book ai didi

javascript - window.location 重定向后是否调用了垃圾收集器?

转载 作者:行者123 更新时间:2023-11-30 08:48:05 26 4
gpt4 key购买 nike

假设我有 javascript:

/*getAttribute is mootools method for retrieving a named attribute*/
var companyNumber = button.getAttribute('data-company-number');

var payPoint = button.getAttribute('data-pay-point');

window.location = '/Payslip/ListPayslips/?companyNumber=' + companyNumber + '&payPoint=' + payPoint

delete payPoint;//is this necessary?
delete companyNumber;//is this necessary?

是否需要删除行?他们会被跟注吗?

最佳答案

没有必要,重定向后所有变量和实例都将被删除。

关于javascript - window.location 重定向后是否调用了垃圾收集器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20109085/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com