Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
How to clear stack after recursion ended?

Because I was having problems with stack overflowing due too deep recursion, I've tried playing around it using while loop. but even tho exiting the recursion before the overflow and re-entering the recursion still causes overflow, how do I clear the allocated memory of the stack that contains the recursion after I exit it?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I'm not sure about that .. but you can try - System.runFinalization(); OR System.runFinalizersOnExit();

over 4 years ago · Santiago Trujillo Relatório

0

When your application close the stack should be cleared your recursion is still probably going too deep. Check your code carefully when you are using recursivity make sure your recursive method end. If your recursive method does end, you could increase your stack size but I would not recommend this. Instead, you should ask your self if your method.

but if you want to increase the stack size check this link: How to increase the Java stack size?

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda