Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
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 answers
Answer question

0

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

over 4 years ago · Santiago Trujillo Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!