Memory problem

  • Thread starter Thread starter Q
  • Start date Start date
Q

Q

Hello,

I have developed an application that does the following.

A timer fires an event every 5 minutes. In the event, files in certain
folders get copied to other (network) directories or
mailed to certain people.

Every time the timer has done its work, I dispose all the used objects. I
even call the Garbadge Collector manually.
Still, the memory the application uses keeps on increasing.

Is there another way to decrease the memory used by the application than
disposing objects and calling Garbadge Collector.
Does any of you have any experience with this problem?
Some good advice would be welcome!!!


Thanks,

Q
 
Q said:
A timer fires an event every 5 minutes. In the event, files in certain
folders get copied to other (network) directories or
mailed to certain people.

Every time the timer has done its work, I dispose all the used objects. I
even call the Garbadge Collector manually.
Still, the memory the application uses keeps on increasing.

I think you'll have to post some code in order to make it possible to detect
the reason for the increasing memory usage.
 
Q said:
Every time the timer has done its work, I dispose all the used objects. I
even call the Garbadge Collector manually.
Still, the memory the application uses keeps on increasing.

What objects are you creating? If you know you are going to use the
same objects, over and over, why not create them once, and use them
for the entire lifetime of the application?

LFS
 
Q

The disposing and calling the garbage collector does not decrease the used
memory.

It only starts the cleaning processes earlier what means that it cost time,
however when there is nothing to clean the used memory stays the same.

An object is cleaned when it has no reference and when there is not an
object anymore that has itself a reference and has a reference too that
object.

So preventing the use of memory is looking where you have shared or static
objects.
By instance by not using modules.

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top