[C] Trouble with memory usage
Hi.. I've written a program that controls if some other program adds or deletes some keys in HKLM\....\Run. If my program finds a mismatch it creates some popups and the user can say : yes modify it, or not, do not modify the reg.
It works fine. Quite.
The problem is that it seems to use the memory in a stupid way so it continues to add 8k of memory to his process ( I see it in the Task Manger )... It starts from about 990k then it continues to grow (and work) until it reaches about 3500k so it is no more able (I dont know why!!!) to read the files he worsk with and it stops (it appears an error because it can't open the files).
I think it is a memory allocation problem or somethign like that.. In the code I allways close the files and register's keys.. or I think I did...
Can you help me finding out the problem?
The problem appears even if the program does nothing...I mean if there are NO modifyes in the reg.. I think the problem is in the FileCompare and his child functions.
Please check the file attached.
Comments are in italian but the code is not hard to understand.