diff --git a/flixel/FlxCamera.hx b/flixel/FlxCamera.hx index 3cfe64fe45..cf41064fc4 100644 --- a/flixel/FlxCamera.hx +++ b/flixel/FlxCamera.hx @@ -594,9 +594,9 @@ class FlxCamera extends FlxBasic * Internal variables, used in blit render mode to draw trianglesSprite on camera's buffer. * Added for less garbage creation. */ - static var renderPoint:FlxPoint = FlxPoint.get(); + static var renderPoint:FlxPoint = new FlxPoint(); - static var renderRect:FlxRect = FlxRect.get(); + static var renderRect:FlxRect = new FlxRect(); @:noCompletion public function startQuadBatch(graphic:FlxGraphic, colored:Bool, hasColorOffsets:Bool = false, ?blend:BlendMode, smooth:Bool = false, ?shader:FlxShader) diff --git a/flixel/FlxG.hx b/flixel/FlxG.hx index a7dd006d2a..409ddbcfaf 100644 --- a/flixel/FlxG.hx +++ b/flixel/FlxG.hx @@ -195,7 +195,7 @@ class FlxG * The dimensions of the game world, used by the quad tree for collisions and overlap checks. * Use `.set()` instead of creating a new object! */ - public static var worldBounds(default, null):FlxRect = FlxRect.get(); + public static var worldBounds(default, null):FlxRect = new FlxRect(); #if FLX_SAVE /** diff --git a/flixel/graphics/tile/FlxDrawTrianglesItem.hx b/flixel/graphics/tile/FlxDrawTrianglesItem.hx index 4447294f87..0bccc23500 100644 --- a/flixel/graphics/tile/FlxDrawTrianglesItem.hx +++ b/flixel/graphics/tile/FlxDrawTrianglesItem.hx @@ -8,6 +8,7 @@ import flixel.math.FlxPoint; import flixel.math.FlxRect; import flixel.system.FlxAssets.FlxShader; import flixel.util.FlxColor; +import flixel.util.FlxDestroyUtil; import openfl.display.Graphics; import openfl.display.ShaderParameter; import openfl.display.TriangleCulling; @@ -20,8 +21,8 @@ typedef DrawData = openfl.Vector; */ class FlxDrawTrianglesItem extends FlxDrawBaseItem { - static var point:FlxPoint = FlxPoint.get(); - static var rect:FlxRect = FlxRect.get(); + static var point:FlxPoint = new FlxPoint(); + static var rect:FlxRect = new FlxRect(); #if !flash public var shader:FlxShader; @@ -126,7 +127,7 @@ class FlxDrawTrianglesItem extends FlxDrawBaseItem indices = null; uvtData = null; colors = null; - bounds = null; + bounds = FlxDestroyUtil.put(bounds); #if !flash alphas = null; colorMultipliers = null; diff --git a/flixel/path/FlxPath.hx b/flixel/path/FlxPath.hx index ccfe6b0c80..2d344803fc 100644 --- a/flixel/path/FlxPath.hx +++ b/flixel/path/FlxPath.hx @@ -151,7 +151,7 @@ class FlxPath extends FlxBasePath /** * Path behavior controls: move from the start of the path to the end then stop. */ - static var _point:FlxPoint = FlxPoint.get(); + static var _point:FlxPoint = new FlxPoint(); /** * The speed at which the object is moving on the path.