Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例えば:
var test = [1,2,3,4,5]; test.length = 0;
これは変数のメモリを解放する良い方法testですか?
test
いいえ、心配する必要はありません。コードが長くなるだけです。変数を最も狭い範囲に保持し、不要になった場合は、ガベージ コレクション システムで処理する必要があります。