Skip to content

Commit

Permalink
Better fix for elliptic curve memory leak. Follows the book by using …
Browse files Browse the repository at this point in the history
…obj_free.
  • Loading branch information
culler committed Sep 3, 2024
1 parent b896bc9 commit db289aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cypari/gen.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ cdef class Gen(Gen_base):
def __dealloc__(self):
if self.is_ref == False and isclone(self.g):
if self.is_dynamic:
gunclone_deep(self.g)
else:
gunclone(self.g)
obj_free(self.g)
gunclone(self.g)
#sig_free(<void*>self.b)

def __repr__(self):
Expand Down

0 comments on commit db289aa

Please sign in to comment.