[issue37270] Manage memory lifetime for all type-related objects.

2019-06-13 Thread Joe Jevnik
Change by Joe Jevnik : -- keywords: +patch pull_requests: +13925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14066 ___ Python tracker ___

[issue37270] Manage memory lifetime for all type-related objects.

2019-06-13 Thread Joe Jevnik
New submission from Joe Jevnik : When using PyType_FromSpec, the memory for PyType_Spec.name, Py_tp_methods, and Py_tp_members needs to somehow outlive the resulting type. This makes it hard to use this interface to generate types without just leaking the memory for these arrays, which is