Hello J, I don't typically use "new" in my C++ applications other than in startup to allocate things that last the life of the application. So, I don't have any issues with double-freeing. I never manually "new" objects after startup. Instead I use containers to contains my objects and leave the allocation and de-allocation to them.
>>Are you sure you're not somehow double-freeing the sqlite handle? >>Especially at close I've seen exit() end up calling atexit() methods >>multiple times in some circumstances... "newed" objects never fires the destructor unless you manually destruct it or use an auto-pointer even when you exit. In fact I use this as a method to get around destructor order issues when my applications exit. I essentially just abandon the "new"ed startup objects. It also makes applications exit faster just to abandon memory and depend on the OS to reclaim all the memory.