Clear Filters
Clear Filters

Garabage collection in a program

2 views (last 30 days)
Sarah Ghosh
Sarah Ghosh on 21 Jun 2013
I am designing a software which has many files written inside it. It works through a GUI. On providing the input, it works fine. But even on providing a new input, it yields the same output (of the previous input). After waiting for a few minutes, on giving the input, it gives the desired output. I believe, it has to do with the memory not getting cleared up fast. Can anybody help? How does garbage collection work with these problems? Thanks in advance.
P.S. I have a system with a 3 GB RAM
  1 Comment
David Sanchez
David Sanchez on 21 Jun 2013
To make it clear, your software returns the desired output the first time you run it. When you insert new input, it returns same answer than with first input. After a while, it returns the output corresponding the second input. Did you try to reset your variables in charge of showing values on the GUI at the beginning of your code? It seems that your code is just right, but it takes some time to perform the calculations, during this time, the values shown on the GUI are still the previous values since they have not changed yet, and once it is done with the calculations, it presents the new data.

Sign in to comment.

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!