G
Giorgos
I allocate 10mb of memory to my program using the following code, which
works fine.
IntPtr[] p = new IntPtr[10000];
for (int k = 0; k < p.Length; k++)
{
p[k] = LocalAlloc(LMEM_FIXED, 1024);
}
Then, I try to release the memory using the code below. The problem is
the memory does not get free until I exit my application.
for (int j = 0; j < p.Length; j++)
{
p[j] = LocalFree(p[j]);
}
I don't understand what I am doing wrong. I hope someone can help me
with this problem. Thanks !
works fine.
IntPtr[] p = new IntPtr[10000];
for (int k = 0; k < p.Length; k++)
{
p[k] = LocalAlloc(LMEM_FIXED, 1024);
}
Then, I try to release the memory using the code below. The problem is
the memory does not get free until I exit my application.
for (int j = 0; j < p.Length; j++)
{
p[j] = LocalFree(p[j]);
}
I don't understand what I am doing wrong. I hope someone can help me
with this problem. Thanks !