Home >Web Front-end >JS Tutorial >Javascript cannot release memory._javascript tips

Javascript cannot release memory._javascript tips

WBOY
WBOYOriginal
2016-05-16 19:26:28966browse

Javascript does not provide absolute control over the use of memory. Therefore, javascript cannot be used to release memory.

I encountered such a situation. When creating an array, we have no way to delete the array and let the data be re-established. Javascript only provides Use the Delete method to clear the variable to empty.

For example:

Var OA=new Array("Hello","Good","Yes")

Delete OA[ 1]

This only sets the value of OA[1] to a null value. That is, the result of OA[1] is undefined.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn