Skip to content

Commit 98ebc67

Browse files
committed
Added documentation about freeing a GIF
1 parent 2365f9b commit 98ebc67

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

shared-bindings/gifio/OnDiskGif.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@
9898
//| display_bus.send(42, struct.pack(">hh", 0, odg.bitmap.width - 1))
9999
//| display_bus.send(43, struct.pack(">hh", 0, odg.bitmap.height - 1))
100100
//| display_bus.send(44, d.bitmap)
101+
//|
102+
//| # The following optional code will free the OnDiskGif and allocated resources
103+
//| # after use. This may be required before loading a new GIF in situations
104+
//| # where RAM is limited and the first GIF took most of the RAM.
105+
//| odg.deinit()
106+
//| odg = None
107+
//| gc.collect()
108+
//|
101109
//| """
102110
//|
103111
//| def __init__(self, file: str) -> None:

0 commit comments

Comments
 (0)