Skip to content

The getBlockchainBlockTransactions method call causes memory leaks #16

@FeiFanLiang

Description

@FeiFanLiang
const httpClient = new HttpClient({
  baseUrl: 'https://tonapi.io',
  baseApiParams: {
    headers: {
      Authorization: `Bearer xxxxx`,
      'Content-type': 'application/json'
    }
  }
})
const client = new Api(httpClient)
async function test() {
  const transcations_res = await client.blockchain
    .getBlockchainBlockTransactions('(0,2000000000000000,47501808)')
    .catch((err) => {
      console.log(err)
    })
  if (transcations_res) {
    console.log('done', transcations_res.transactions.length)
  }
}
setInterval(() => {
    test()
  }, 1000)

Regular use of process.memoryUsage() analysis found that the occupancy of arrayBuffers continues to increase and will not be released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions