#5944·Xray-core

iOS high memory usage/memory leak

Author: nbghereCreated Apr 15, 2026Updated Aug 27, 2026

Integrity requirements

  • I have read all the comments in the issue template and ensured that this issue meet the requirements.
  • I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
  • I provided the complete config and logs, rather than just providing the truncated parts based on my own judgment.
  • I searched issues and did not find any similar issues.
  • The problem can be successfully reproduced in the latest Release

Description

Memory leaks are persistent when using certain iOS apps. The pprof profiles are attached.

Metrics.zip

Reproduction Method

none

Client config

{
  "dns" : {
    "queryStrategy" : "UseIPv4"
  },
  "inbounds" : [
    {
      "listen" : "127.0.0.1",
      "port" : 10808,
      "protocol" : "socks",
      "settings" : {
        "auth" : "noauth",
        "udp" : true
      },
      "sniffing" : {
        "destOverride" : [
          "quic",
          "http",
          "tls"
        ],
        "enabled" : true,
        "excludedDomains" : [

        ],
        "metadataOnly" : false,
        "routeOnly" : true
      },
      "tag" : "socks-in"
    },
    {
      "listen" : "127.0.0.1",
      "port" : 10809,
      "protocol" : "http",
      "settings" : {
        "auth" : "noauth",
        "udp" : true
      },
      "sniffing" : {
        "destOverride" : [
          "quic",
          "http",
          "tls"
        ],
        "enabled" : true,
        "excludedDomains" : [

        ],
        "metadataOnly" : false,
        "routeOnly" : true
      },
      "tag" : "http"
    },
    {
      "listen" : "127.0.0.1",
      "port" : 10820,
      "protocol" : "socks",
      "settings" : {
        "auth" : "noauth",
        "udp" : true
      },
      "sniffing" : {
        "destOverride" : [
          "quic",
          "http",
          "tls"
        ],
        "enabled" : true,
        "excludedDomains" : [

        ],
        "metadataOnly" : false,
        "routeOnly" : true
      },
      "tag" : "socks-direct"
    }
  ],
  "outbounds" : [
    {
      "protocol" : "vless",
      "settings" : {
        "testpre" : null,
        "testseed" : null,
        "vnext" : [
          {
            "address" : "example.com",
            "port" : 443,
            "users" : [
              {
                "encryption" : "none",
                "flow" : "xtls-rprx-vision",
                "id" : "uuidhere",
                "level" : 8,
                "security" : "auto"
              }
            ]
          }
        ]
      },
      "streamSettings" : {
        "network" : "tcp",
        "realitySettings" : {
          "fingerprint" : "chrome",
          "publicKey" : "pbkhere",
          "serverName" : "example.com",
          "shortId" : "111111123123123",
          "show" : false,
          "spiderX" : ""
        },
        "security" : "reality",
        "tcpSettings" : {
          "header" : {
            "type" : "none"
          }
        }
      },
      "tag" : "proxy"
    },
    {
      "protocol" : "freedom",
      "tag" : "direct"
    },
    {
      "protocol" : "blackhole",
      "tag" : "block"
    }
  ],
  "policy" : {
    "levels" : {
      "8" : {
        "bufferSize" : 3,
        "connIdle" : 300,
        "downlinkOnly" : 4,
        "handshake" : 3,
        "uplinkOnly" : 2
      }
    },
    "system" : {

    }
  },
  "remarks" : "Test",
  "routing" : {
    "domainStrategy" : "AsIs",
    "rules" : [
      {
        "inboundTag" : [
          "socks-direct"
        ],
        "outboundTag" : "direct"
      }
    ]
  }
}

Server config

none

Client log

none

Server log

none