From: | Damir Arh |
Date: | 14 Aug 2000 at 15:33:05 |
Subject: | Re: Passing a ptr |
Hello!
> FreePooled (mempool, array, sizeof (mystruct * arraysize));
> This line causes a poolwatch hit which says the size being
> freed (4, sizeof (array) isn't what was allocated (sizeof (
> mystruct * arraysize). If I remove this line and let DeletePool
> handle it the program runs without hits. If I replace the
> AllocPooled with AllocVec and then use FreeVec it works
> fine. Any idea why this is happening?
I am not that familiar pools but I find it odd that you have written
sizeof(mystruct * arraysize), it should be sizeof(mystruct)*arraysize, I
guess.
Kind regards