Skip to content
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

Memory leak with string conversion functions #118

Closed
itzpr3d4t0r opened this issue Oct 1, 2022 · 1 comment · Fixed by #119
Closed

Memory leak with string conversion functions #118

itzpr3d4t0r opened this issue Oct 1, 2022 · 1 comment · Fixed by #119
Assignees

Comments

@itzpr3d4t0r
Copy link
Member

itzpr3d4t0r commented Oct 1, 2022

Every function that converts shapes into strings is leaking memory, with print statements unexplicably leaking 10X slower than dunder methods.

Watch out! this is leaking fast i'm not responsible for any memory corruption/OS crash!

I used this code:

from geometry import Line, Circle, Polygon

line = Line((0, 0), (1, 1))
circle = Circle((0, 0), 1)
polygon = Polygon([(0, 0), (1, 1), (1, 0)])
while True:
    line.__repr__()
    # circle.__repr__()
    # polygon.__repr__()
    # line.__str__()
    # circle.__str__()
    # polygon.__str__()
    # print(line)
    # print(circle)
    # print(polygon)
@itzpr3d4t0r itzpr3d4t0r added type:bug Something isn't working priority:critical labels Oct 1, 2022
@itzpr3d4t0r itzpr3d4t0r self-assigned this Oct 1, 2022
@itzpr3d4t0r
Copy link
Member Author

I'll tackle this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants