Skip to content

PyTypeFactory return type leak #320

@philippedistributive

Description

@philippedistributive

Issue type

Bug

How did you install PythonMonkey?

None

OS platform and distribution

No response

Python version (python --version)

No response

PythonMonkey version (pip show pythonmonkey)

No response

Bug Description

When pyTypeFactory returns an object such as in

return new StrType(cx, rval.toString());

it is never freed and thus leaks

Philippe Laporte
[12:30 PM]
Hi, the new allocations in pyTypeFactory, when do they get deallocated?

Caleb
[12:34 PM]
as far as I know, never, so they leak. It's likely we should do away with that function returning a PyType altogether and just return a PyObject*, as it has turned out to not be a useful pattern

Standalone code to reproduce the issue

No response

Relevant log output or backtrace

No response

Additional info if applicable

No response

What branch of PythonMonkey were you developing on? (If applicable)

No response

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions