StatementIterator leaks if not run to completion

Aberta
#457 2 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
48/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
javascript, sqlite
Domínio
database

Direção de pesquisa

Start in src/api.js at the StatementIterator next implementation referenced by the issue, then review the ECMAScript optional iterator return method. Confirm how early for...of termination behaves when using break, return, or an exception. Done means the statement is reclaimed on early termination instead of remaining allocated until the Database closes.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

A statement provided by StatementIterator can be leaked until the Database is closed if the iterator is not run to completion. A statement is not freed until next is called for the following iteration, which might not happen if, for example, a for...of loop is exited via break, return, or thrown exception.

Careful coding can work around this issue, but that code will also be uglier and harder to read. A better fix would be to implement the optional return method on the iterator to reclaim its resources, as that will be automatically called on early loop termination.

Linguagem predominante
JavaScript
Estrelas
13.7k
Forks
1.1k
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de sql-js/sql.js

Todas as issues de sql-js/sql.js

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.