|
From: Abhijit S. <mu...@gm...> - 2003-07-24 18:56:51
|
> but if i try do delete the class, it will throw an exception. > In the destructor I do delete [] pDataArray; , with LocalFree() it is the same. The array you're trying to delete[] is statically allocated. You cannot free or delete[] or whatever it; it's part of the compiled executable itself. To realloc()/free(), etc., you'll need to dynamically allocate memory. Also, you mention that you're using threads. One good thing to do would be, after delete'ing, NULL the pointer so that delete attempts by other threads will not result in a page fault. -- Abhijit Shylanath Homepage: http://mudeth.tripod.com/ |