开发者

Call an External C++ function and Memory Leaks: is all allocated memory cleaned up after finishing Python script?

开发者 https://www.devze.com 2023-03-08 14:53 出处:网络
Python script calls an external 开发者_如何学编程C++ function (using ctypes). Memory leaks are possible when execution the C++ function.

Python script calls an external 开发者_如何学编程C++ function (using ctypes). Memory leaks are possible when execution the C++ function.

Will all allocated memory (in C++ function) be automatically cleaned up after finishing of the Python script?


Yes, It will all be returned to the OS once the python interpreter exits. This is true for all processes - nothing specific to python or c++.

0

精彩评论

暂无评论...
验证码 换一张
取 消