From 98ebc676ce273734d5818b7910cb5b6ded4017ee Mon Sep 17 00:00:00 2001 From: gamblor21 Date: Wed, 22 Mar 2023 18:00:18 -0500 Subject: [PATCH] Added documentation about freeing a GIF --- shared-bindings/gifio/OnDiskGif.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shared-bindings/gifio/OnDiskGif.c b/shared-bindings/gifio/OnDiskGif.c index 3eb56a1c32..cc7112c04c 100644 --- a/shared-bindings/gifio/OnDiskGif.c +++ b/shared-bindings/gifio/OnDiskGif.c @@ -98,6 +98,14 @@ //| display_bus.send(42, struct.pack(">hh", 0, odg.bitmap.width - 1)) //| display_bus.send(43, struct.pack(">hh", 0, odg.bitmap.height - 1)) //| display_bus.send(44, d.bitmap) +//| +//| # The following optional code will free the OnDiskGif and allocated resources +//| # after use. This may be required before loading a new GIF in situations +//| # where RAM is limited and the first GIF took most of the RAM. +//| odg.deinit() +//| odg = None +//| gc.collect() +//| //| """ //| //| def __init__(self, file: str) -> None: