delphi package - easy access to kernel objects etc.
-
zcecil
- Posts: 22
- Joined: Thu Sep 09, 2004 8:16 am
Post
by zcecil »
I wrote a program which checks process lists regularly.
Timer1->Interval = 10 ms.
Code: Select all
DelphiInterface<IProcesses> processes = Processes("*");
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
proc->RefreshItems();
for( int i=0; i<proc->ItemCount; ++i){
if( proc->Items[i]->IsValid() ) {
// do nothing, just for test
}
}
}
The program's memory usage is growing when processes created or closed, and it doesn't seems to decrease.
-
madshi
- Site Admin
- Posts: 10764
- Joined: Sun Mar 21, 2004 5:25 pm
Post
by madshi »
Try minimizing the program and restoring it again. Does the memory consumption go back again then?
-
zcecil
- Posts: 22
- Joined: Thu Sep 09, 2004 8:16 am
Post
by zcecil »
The memory usage drops from 76xxK to 1xxxK when minimized, then it keeps growing slowly( same speed as not minimized).
After I restore and minimized again, it drops back to 1xxxK and then growing again.
What's the cause of this problem?
-
madshi
- Site Admin
- Posts: 10764
- Joined: Sun Mar 21, 2004 5:25 pm
Post
by madshi »
That's the typical behaviour of Delphi's/Windows' memory manager. It's no memory leak, it's just the way it is. Nothing to worry about, I think.