sergzach
sergzach

Reputation: 6754

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

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?

Upvotes: 1

Views: 181

Answers (1)

user2100815
user2100815

Reputation:

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++.

Upvotes: 2

Related Questions