mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 02:54:24 +00:00
fix n64texconv python bindings memory management
This commit is contained in:
parent
ddec1a317c
commit
ccb20a00b3
1 changed files with 1 additions and 1 deletions
|
@ -354,9 +354,9 @@ class N64Image(Structure):
|
|||
return deref(ln64texconv.n64texconv_image_new(width, height, fmt, siz, pal))
|
||||
|
||||
def __del__(self):
|
||||
ln64texconv.n64texconv_image_free(byref(self))
|
||||
# Also free the palette if the reference count drops to 0
|
||||
_object_refcount.rm_ref(self.pal, ln64texconv.n64texconv_palette_free)
|
||||
ln64texconv.n64texconv_image_free(byref(self))
|
||||
|
||||
def copy(self) -> Optional["N64Image"]:
|
||||
_object_refcount.add_ref(self.pal)
|
||||
|
|
Loading…
Add table
Reference in a new issue