Handle and pointer, image interpretation

Handle and pointer, image interpretation

Reference video: https://www.bilibili.com/video/BV1Vb4y1d7rp?share_source=copy_pc

1. What are handles and pointers?

What exactly are pointers?

int *pAge = malloc(sizeof(int));//c语言
int *pAgeCPP = new int;//c++

image-20220705162843346

What exactly is a handle?

A handle is a reference

image-20220705170451043

2. Why must handles be used?

Save the resource space of the kernel layer, more efficient

おすすめ

転載: blog.csdn.net/weixin_61777209/article/details/125623939