[Python.NET] Finalizers and proper dereference of CPython objects

Denis Akhiyarov denis.akhiyarov at gmail.com
Thu Jun 7 23:18:28 EDT 2018


There is a fix for this but the code review and merging of related PR is
not complete yet:

https://github.com/pythonnet/pythonnet/issues/541


On Fri, Jun 1, 2018, 12:56 PM Tom Unger <tunger at mitem.com> wrote:

>
>
> PythonException, PyObjecdt, PyScope have finallizers defined as:
>
>
>
>         ~PyObject()
>
>         {
>
>             // We needs to disable Finalizers until it's valid
> implementation.
>
>             // Current implementation can produce low probability floating
> bugs.
>
>             return;
>
>
>
>             Dispose();
>
>         }
>
>
>
> So the finalizer does not call dispose.  Does this mean that I must
> explicitly Dispose all such objects to ensure no memory leaks?
>
>
>
> Thanks,
>
>
>
> Tom
>
>
>
>
> _________________________________________________
> Python.NET mailing list - PythonDotNet at python.org
> https://mail.python.org/mailman/listinfo/pythondotnet
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20180607/94441fcb/attachment.html>


More information about the PythonDotNet mailing list