C#-value type array allocated on managed Heap.

来源:互联网 发布:高德 js sdk 定位 api 编辑:程序博客网 时间:2024/06/05 03:49

Value type array allocate

1. Define local variable as value type array(e.g. int[] testAry = new int[100]),

CLR creates it as following:
1. Create a variable testAry on Stack.

2.  Allocated memory on Managed Heap for storing 100 int32 type values.

3. testAry is pointed to the memory on Managed Heap.


原创粉丝点击