I am trying to understand how memory is managed when python is embedded in C# using python.net. Python is executed in C# using the py.GIL (global interpreter lock), essentially C# calls the python interpreter and executes the python code. What I don't understand is how is memory allocated and deallocated for python objects.
I couldn't find anything online and any type of help will be appreciated.