Skip to content

Use FlxPoint.weak() instead of FlxPoint.get() for frame size points #3607

Description

@SimonArs

While I was exploring places in my project where I have point leak I found this place in FlxSprite loadGraphic():

                if (animated)
                        frames = FlxTileFrames.fromGraphic(graph, FlxPoint.get(frameWidth, frameHeight));
                else
                        frames = graph.imageFrame;

Imo this is the perfect place to use a weak point. Moreover, point isnt put anywhere after using

Upd: the same leak in loadRotatedGraphic()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions