From 91fb851cb384fb45986cd1e80d2c63a7c22415b8 Mon Sep 17 00:00:00 2001 From: Daniel Mekuria <81825041+daniel-mekuria@users.noreply.github.com> Date: Tue, 28 Nov 2023 19:58:13 +0300 Subject: [PATCH] fixed a memory leak that caused the pe file to be access locked. --- pefile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pefile.py b/pefile.py index f4b49fa..10270ee 100644 --- a/pefile.py +++ b/pefile.py @@ -29,6 +29,8 @@ import string import mmap import uuid +import gc + from collections import Counter from typing import Union @@ -2962,6 +2964,7 @@ def _close_data(self): ): self.__data__.close() del self.__data__ + gc.collect() def close(self): self._close_data()