Skip to content

Commit 46b6b70

Browse files
committed
fix(python): keep previous GC info
[no changelog]
1 parent d5d869e commit 46b6b70

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/src/trezorlib/debuglink.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@ def __init__(self, transport: "Transport", auto_interact: bool = True) -> None:
502502
self.waiting_for_layout_change = False
503503

504504
self.input_wait_type = DebugWaitType.IMMEDIATE
505+
506+
# For detecting GC leaks / heap fragmentation
505507
self.prev_gc_info: dict[str, int] = {}
506508

507509
@property
@@ -1333,6 +1335,7 @@ def get_new_client(self) -> TrezorClientDebugLink:
13331335
new_client.debug.t1_screenshot_directory = self.debug.t1_screenshot_directory
13341336
new_client.debug.t1_screenshot_counter = self.debug.t1_screenshot_counter
13351337
new_client.debug.t1_take_screenshots = self.debug.t1_take_screenshots
1338+
new_client.debug.prev_gc_info = self.debug.prev_gc_info
13361339
return new_client
13371340

13381341
def close_transport(self) -> None:

0 commit comments

Comments
 (0)