内存释放

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	
</body>
<script type="text/javascript">
	strTest = "1";
	for ( var i = 0; i < 10; i ++ ){
		strTest += strTest;
	}
	console.log(strTest);    // 111111111111111111111111111111111...11111111111111111111111
	delete strTest;
	// CollectGarbage();
	console.log(strTest)    // undefined
</script>
</html>

  

posted @ 2017-09-19 10:45  likwin  阅读(135)  评论(0编辑  收藏  举报