HaxeFlixel / HaxeFlixel/flixel-addons

What happens to the old body? Overwritten, or memory leak?

Open
#237 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haxe
Stars
196
Forks
175
PR merge metrics
No merged PRs in 30d

Description

https://github.com/HaxeFlixel/flixel-addons/blob/dev/flixel/addons/nape/FlxNapeSprite.hx#L253

Not sure about this, but maybe

FlxNapeSpace.bodies.remove(this.body);

should be added before the

this.body = body;

?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at flixel/addons/nape/FlxNapeSprite.hx around line 253 and inspect how replacing this.body interacts with FlxNapeSpace.bodies. Determine whether the previous body remains registered or becomes leaked; done means body replacement leaves no stale registration and preserves the expected behavior.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.