初始化库时会发生什么?
我正在使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论