And Wan - 2013-06-28

I have a dynamic memory problem.

I have an "ENGINE" class which has hunspell member pointer. (ENGINE class just has utility FindWord(), Options, etc)

I have ENGINE/hunspell in one DLL and I created a "singleton" wrapper class with a static member pointer of type ENGINE class. I would like this to be a global static across DLLs.

In my main app I access the "singleton" which in turn creates an instance of ENGINE (which then creates instance of hunspell, etc).

Once it returns, I get memory access violation errors:

First-chance exception in EXE (KERNELBASE.DLL): 0xE06D7363: Microsoft C++ Exception.
Warning: Critical memory allocation failed!
Warning: Shrinking safety pool from 512 to 444 to satisfy request of 64 bytes.
Warning: Freeing application's memory safety pool!
ERROR: Critical memory allocation from safety pool failed!
First-chance exception in EXE (NTDLL.DLL): 0xC0000005: Access Violation.


What am I doing wrong??