2011/9/5 Frédéric Delanoy frederic.delanoy@gmail.com:
- keys = HeapAlloc(GetProcessHeap(), 0, capacity * sizeof(WCHAR*));
- vals = HeapAlloc(GetProcessHeap(), 0, capacity * sizeof(LARGE_INTEGER));
...
- keys = HeapReAlloc(GetProcessHeap(), 0, keys,
- capacity * sizeof(WCHAR*));
- vals = HeapReAlloc(GetProcessHeap(), 0, vals,
- capacity * sizeof(LARGE_INTEGER));
Memory allocations can fail. You also never free these, but I suppose that happens implicitly on process termination.