Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
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 Respuestas
Responde la pregunta

0

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

over 4 years ago · Santiago Trujillo Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda