Commit 418ac5bf authored by Zhi Cun's avatar Zhi Cun Committed by hetech

Select: Fix memory leak issue (#16463)

parent adabeff9
...@@ -153,6 +153,10 @@ ...@@ -153,6 +153,10 @@
}, },
beforeDestroy() { beforeDestroy() {
let index = this.select.cachedOptions.indexOf(this);
if (index > -1) {
this.select.cachedOptions.splice(index, 1);
}
this.select.onOptionDestroy(this.select.options.indexOf(this)); this.select.onOptionDestroy(this.select.options.indexOf(this));
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment