-
Notifications
You must be signed in to change notification settings - Fork 747
Memory leak in CLRObject #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
filmor
pushed a commit
that referenced
this issue
Jun 17, 2019
…m Python (#853) * added a regression test for #881 #811 * when converting to object, wrap values of unknown type into PyObject instead of failing This enables overload resolution with object parameters to behave the same way PyObject parameters behave - e.g. allow any Python object to be passed as PyObject as fallback. Resolves #811
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Oct 21, 2019
lostmsu
added a commit
to losttech/pythonnet
that referenced
this issue
Feb 27, 2020
filmor
pushed a commit
that referenced
this issue
Mar 3, 2020
…m Python (#889) * added a regression test for #881 * when converting to object, wrap values of unknown type into PyObject instead of failing This enables overload resolution with object parameters to behave the same way PyObject parameters behave - e.g. allow any Python object to be passed as PyObject as fallback. Resolves #811 * fixed ObjectField conversion test * fixed test_object_indexer to pass on custom class key * use object() instance in OverloadResolution_UnknownToObject test
@NickSavin Can you check whether things have improved with the current master/2.5.0rc2? |
AlexCatarino
pushed a commit
to QuantConnect/pythonnet
that referenced
this issue
Jun 18, 2020
…m Python (pythonnet#853) * added a regression test for pythonnet#881 pythonnet#811 * when converting to object, wrap values of unknown type into PyObject instead of failing This enables overload resolution with object parameters to behave the same way PyObject parameters behave - e.g. allow any Python object to be passed as PyObject as fallback. Resolves pythonnet#811
AlexCatarino
pushed a commit
to QuantConnect/pythonnet
that referenced
this issue
Jun 29, 2020
…m Python (pythonnet#889) * added a regression test for pythonnet#881 * when converting to object, wrap values of unknown type into PyObject instead of failing This enables overload resolution with object parameters to behave the same way PyObject parameters behave - e.g. allow any Python object to be passed as PyObject as fallback. Resolves pythonnet#811 * fixed ObjectField conversion test * fixed test_object_indexer to pass on custom class key * use object() instance in OverloadResolution_UnknownToObject test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Details
Describe what you were trying to get done.
Hello, we are using PythonNet to execute custom python scripts in our C# application. We pass a set of large .net objects (such as DataTable with a big bunch of data) as a script locals. When we execute such sctripts multiple times we got an OutOfMemoryException
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.
Here we cache PyScope and PyDict. Pydict contains our large .net objects, translated to Python
This method we execute each time, after we finished our work with script. As you can see, I tried different way to clean up resources, but memory leak still occures, after multiple executions.
I did a snapshot of memory with .net profiler, and found that there a references to my DataTables from the CLRObject and I did not find a way how to release it.
StackTrace
The text was updated successfully, but these errors were encountered: