A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/AlmasB/FXGL/issues/1024 below:

Check the need for active.set(false); in Entity::clean · Issue #1024 · AlmasB/FXGL · GitHub

It appears active is always false at that point, in which case the call is redundant and can be removed:

// TODO: we probably don't need to set active false again, since we do that in markForRemoval? active.set(false); }

I have looked at call sites for clean() in GameWorld and they are always preceded by marForRemoval()

void markForRemoval() { onNotActive.run(); active.set(false); }

So, active is false. This code is in a robust-critical section, so I'd like a second review.

@adambocco could you double check the clean() call sites and see if it is somehow possible for active to be true before it reaches clean.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4