初始化库时会发生什么?

发布于 2025-02-05 09:05:35 字数 157 浏览 2 评论 0原文

我正在使用GLFW,并且对使用库的逻辑感到困惑。根据我对函数的理解,当调用函数时,执行内部的代码,并在其结束时处理上述功能分配的任何内存。尽管在调用glfwinit()时,这允许随后使用其他GLFW功能。我的直觉是,此函数调用在该函数之后不会影响代码,那么这是如何发生的?

I'm using GLFW and am getting confused by the logic of using libraries. According to my understanding of functions, when a function is called, the code within is executed and any memory allocated by said function is deallocated at the end of it. Although when calling glfwInit() for example, this allows for the subsequent use of other GLFW functions. My intuition is that this function call would have no effect on the code after it, so how is this happening?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文