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

Tom Unger tunger at mitem.com
Fri Jun 1 13:55:54 EDT 2018


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20180601/f83f1ef5/attachment.html>


More information about the PythonDotNet mailing list