Skip to content

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

Closed

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

Activity

  1. added
    bug
    on Feb 4, 2026
  2. AmyrAhmady commented on Feb 4, 2026

    @AmyrAhmady
    Member

    What are you using to create them? is this CAPI? Pawn? or cpp-sdk?

  3. joaoseidel commented on Feb 4, 2026

    @joaoseidel
    Author

    What are you using to create them? is this CAPI? Pawn? or cpp-sdk?

    I'm using the CAPI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions