From 741fe7042264b8d66b13cebad920a049b80d7a39 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Tue, 3 Oct 2023 01:23:55 +0200 Subject: [PATCH] Fix Frame Collections not being destroyed --- flixel/graphics/FlxGraphic.hx | 2 ++ flixel/graphics/frames/FlxImageFrame.hx | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/flixel/graphics/FlxGraphic.hx b/flixel/graphics/FlxGraphic.hx index d73adac93b..09e48a55c1 100644 --- a/flixel/graphics/FlxGraphic.hx +++ b/flixel/graphics/FlxGraphic.hx @@ -516,6 +516,8 @@ class FlxGraphic implements IFlxDestroyable { var collections:Array = getFramesCollections(collection.type); collections.push(collection); + if (!frameCollectionTypes.contains(collection.type)) + frameCollectionTypes.push(collection.type); } } diff --git a/flixel/graphics/frames/FlxImageFrame.hx b/flixel/graphics/frames/FlxImageFrame.hx index 2cc7350fe9..a64bb7c6a7 100644 --- a/flixel/graphics/frames/FlxImageFrame.hx +++ b/flixel/graphics/frames/FlxImageFrame.hx @@ -245,12 +245,6 @@ class FlxImageFrame extends FlxFramesCollection return imageFrame; } - override public function destroy():Void - { - super.destroy(); - FlxDestroyUtil.destroy(frame); - } - function get_frame():FlxFrame { return frames[0];