From 1ff32f2892753dfb2886a0c7303f20bb4469326d Mon Sep 17 00:00:00 2001 From: OverloadedOrama Date: Wed, 19 Aug 2020 01:01:00 +0300 Subject: [PATCH] Fixed some leak issues with gdgifexporter Made scrips extend Reference instead of Node --- addons/gdgifexporter/converter.gd | 2 +- addons/gdgifexporter/gif-lzw/lsbbitpacker.gd | 2 +- addons/gdgifexporter/gif-lzw/lsbbitunpacker.gd | 2 +- addons/gdgifexporter/gif-lzw/lzw.gd | 2 +- addons/gdgifexporter/gifexporter.gd | 2 +- addons/gdgifexporter/little_endian.gd | 2 +- addons/gdgifexporter/quantization/median_cut.gd | 2 +- src/Autoload/Export.gd | 2 +- src/Tools/Base.gd | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/gdgifexporter/converter.gd b/addons/gdgifexporter/converter.gd index 03598a301..c9f7d2f86 100644 --- a/addons/gdgifexporter/converter.gd +++ b/addons/gdgifexporter/converter.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference var _shader: Shader diff --git a/addons/gdgifexporter/gif-lzw/lsbbitpacker.gd b/addons/gdgifexporter/gif-lzw/lsbbitpacker.gd index c40b70901..8fe3ac43d 100644 --- a/addons/gdgifexporter/gif-lzw/lsbbitpacker.gd +++ b/addons/gdgifexporter/gif-lzw/lsbbitpacker.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference class LSB_LZWBitPacker: diff --git a/addons/gdgifexporter/gif-lzw/lsbbitunpacker.gd b/addons/gdgifexporter/gif-lzw/lsbbitunpacker.gd index d2348dc0f..be8e9d6bf 100644 --- a/addons/gdgifexporter/gif-lzw/lsbbitunpacker.gd +++ b/addons/gdgifexporter/gif-lzw/lsbbitunpacker.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference class LSB_LZWBitUnpacker: diff --git a/addons/gdgifexporter/gif-lzw/lzw.gd b/addons/gdgifexporter/gif-lzw/lzw.gd index 87ed25d60..6cfd6f30a 100644 --- a/addons/gdgifexporter/gif-lzw/lzw.gd +++ b/addons/gdgifexporter/gif-lzw/lzw.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference var lsbbitpacker = preload('./lsbbitpacker.gd') diff --git a/addons/gdgifexporter/gifexporter.gd b/addons/gdgifexporter/gifexporter.gd index a8af577dd..426d8f3d3 100644 --- a/addons/gdgifexporter/gifexporter.gd +++ b/addons/gdgifexporter/gifexporter.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference var little_endian = preload('./little_endian.gd').new() diff --git a/addons/gdgifexporter/little_endian.gd b/addons/gdgifexporter/little_endian.gd index 1077f183a..cb865e1a3 100644 --- a/addons/gdgifexporter/little_endian.gd +++ b/addons/gdgifexporter/little_endian.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference func int_to_2bytes(value: int) -> PoolByteArray: diff --git a/addons/gdgifexporter/quantization/median_cut.gd b/addons/gdgifexporter/quantization/median_cut.gd index 823e9bf9a..ba81994a5 100644 --- a/addons/gdgifexporter/quantization/median_cut.gd +++ b/addons/gdgifexporter/quantization/median_cut.gd @@ -1,4 +1,4 @@ -extends Node +extends Reference var converter = preload('../converter.gd').new() diff --git a/src/Autoload/Export.gd b/src/Autoload/Export.gd index a9868529f..1615be7c3 100644 --- a/src/Autoload/Export.gd +++ b/src/Autoload/Export.gd @@ -240,7 +240,7 @@ func export_gif(args: Dictionary) -> void: Global.notification_label("File(s) exported") -func write_frame_to_gif(image: Image, wait_time: float, exporter: Node, export_dialog: Node) -> void: +func write_frame_to_gif(image: Image, wait_time: float, exporter: Reference, export_dialog: Node) -> void: exporter.write_frame(image, wait_time, quantization) increase_export_progress(export_dialog) diff --git a/src/Tools/Base.gd b/src/Tools/Base.gd index cbd868d7f..dd563634f 100644 --- a/src/Tools/Base.gd +++ b/src/Tools/Base.gd @@ -73,7 +73,7 @@ func cursor_move(position : Vector2) -> void: func draw_indicator() -> void: var rect := Rect2(_cursor, Vector2.ONE) - Global.canvas.draw_rect(rect, Color.blue, false) + Global.canvas.indicators.draw_rect(rect, Color.blue, false) func _get_draw_rect() -> Rect2: