Skip to content

Prevent potential memory buildup by cancelling removeAfter task#300

Closed
v3921358 wants to merge 1 commit intoP0nk:masterfrom
v3921358:Self-Destruction-Optimization
Closed

Prevent potential memory buildup by cancelling removeAfter task#300
v3921358 wants to merge 1 commit intoP0nk:masterfrom
v3921358:Self-Destruction-Optimization

Conversation

@v3921358
Copy link

Call getMap().dismissRemoveAfter(this) to cancel the scheduled removeAfter task. This prevents task 9400547 from repeatedly scheduling long-running (90000s) operations, which could lead to memory leak-like accumulation over time.

Description

This change introduces a call to getMap().dismissRemoveAfter(this) to proactively cancel a previously scheduled removeAfter task. Without this, task 9400547 may continuously reschedule operations with a long delay (90000 seconds), leading to memory pressure or leaks. This fix ensures proper lifecycle management and prevents such unbounded task accumulation.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested my changes
  • I have added unit tests that prove my changes work

Call getMap().dismissRemoveAfter(this) to cancel the scheduled removeAfter task. This prevents task 9400547 from repeatedly scheduling long-running (90000s) operations, which could lead to memory leak-like accumulation over time.
breakcraft pushed a commit to breakcraft/Cosmic that referenced this pull request Jun 14, 2025
@ronancpl
Copy link

Close this, it was already solved.

@v3921358 v3921358 closed this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants