Skip to content

Commit

Permalink
fixed a memory leak that caused the pe file to be access locked.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-mekuria authored Nov 28, 2023
1 parent dcf780e commit 91fb851
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import string
import mmap
import uuid
import gc


from collections import Counter
from typing import Union
Expand Down Expand Up @@ -2962,6 +2964,7 @@ def _close_data(self):
):
self.__data__.close()
del self.__data__
gc.collect()

def close(self):
self._close_data()
Expand Down

0 comments on commit 91fb851

Please sign in to comment.