Skip to content

Commit

Permalink
fix all leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgen-lentz committed Oct 27, 2024
1 parent ee216a7 commit 3015c3c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion amplpy/iterators.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ cdef class MemberRangeIterator(object):
cdef size_t size
cdef campl.AMPL_VARIANT* variant
campl.AMPL_TupleGetSize(it, &size)
self.iterator += 1
if size == 1:
campl.AMPL_TupleGetVariant(it, 0, &variant)
py_variant = to_py_variant(variant)
Expand Down
2 changes: 1 addition & 1 deletion amplpy/objective.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cdef class Objective(Entity):
entity._name = name
entity._index = index
entity.wrap_function = campl.AMPL_OBJECTIVE
entity._parent = parent
entity._entity = parent
if entity._entity is not None:
Py_INCREF(entity._entity)
return entity
Expand Down

0 comments on commit 3015c3c

Please sign in to comment.