Skip to content

Commit bc54470

Browse files
committed
🍐 intro CG 🍎
1 parent 8364262 commit bc54470

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

Diff for: README.md

+3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
————[wikipedia](https://zh.wikipedia.org/wiki/%E5%86%85%E5%AD%98%E6%B3%84%E6%BC%8F)
3030

3131

32+
**⚠️注:下文中标注的CG是Chrome浏览器中Devtools的【collect garbage】按钮缩写**
33+
![cg](./images/CG.png)
34+
3235
## 意外的全局变量
3336

3437
JavaScript对未声明变量的处理方式:在全局对象上创建该变量的引用(即全局对象上的属性,不是变量,因为它能通过`delete`删除)。如果在浏览器中,全局对象就是**window**对象。

Diff for: images/CG.png

31 KB
Loading

Diff for: 常见的JavaScript内存泄露/常见的JavaScript内存泄露.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
![](./images/head.jpg)
44

5+
> **⚠️注:下文中标注的CG是Chrome浏览器中Devtools的【collect garbage】按钮缩写**
6+
![cg](./images/CG.png)
57

68
## 什么是内存泄露
79
> **内存泄漏**指由于疏忽或错误造成程序未能释放已经不再使用的内存。内存泄漏并非指内存在物理上的消失,而是应用程序分配某段内存后,由于设计错误,导致在释放该段内存之前就失去了对该段内存的控制,从而造成了内存的浪费。

0 commit comments

Comments
 (0)