Q: I noticed that sometimes when I open and close a dialog box, the system memory available decreases by 4kB. Is this a memory leak?
No. The minimum amount of memory Windows CE allocates to a thread is 4kB. That memory is sometimes not recovered immediately after the memory has been released. The memory is recovered when the virtual memory manager performs periodic garbage collection.