Skip to content

Gangzone IDs are never recycled after destroy, causing pool exhaustion after 1024 creates #1199

@joaoseidel

Description

@joaoseidel

Describe the bug
Gangzones IDs are never returned to the pool after GangZone_Destroy() is called. While the destroy function returns success (true), the internal ID is not marked as available for reuse. This causes the gangzone pool to become permanently exhausted after 1024 total creations, even if only a handful of gangzones remain active.

Expected behavior

  • GangZone_Destroy() should mark the gangzone ID as available for reuse
  • After destroying a gangzone, its ID should be returned to a free pool
  • The system should support unlimited create/destroy cycles as long as active count < 1024
  • Only the active gangzone count should matter, not the total number of creates

Actual Behavior

  • GangZone_Destroy() returns success but does not free the ID
  • IDs increment monotonically from 0 to 1023 and are never reused
  • After 1024 total creations, GangZone_Create() always fails with nullptr and id=0
  • The gangzone pool becomes permanently exhausted until server restart
  • Server becomes unable to create gangzones even with 0 active zones

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions