Hi all,
 Is there anyway to track down memory leaks with using sqlite? I have 2 apps 
sharing one database file. Application #1 only ever uses a single thread, so 
I just open the db struct at startup, and close it at shutdown. Closing down 
returns SQLITE_OK. My second app opens a handle to the database at startup, 
closes it at shutdown. However, it sometimes spawns threads, and at the 
beginning of each thread, I get a new handle to the database, and close it 
when the thread is killed. So I'm following the rule of not sharing handles 
between threads. Now when I close app #1, and app #2 has accessed the 
database in a multithreaded way, I get this dump:
 Detected memory leaks!
Dumping objects ->
 {25360} normal block at 0x05E13788, 19 bytes long.
Data: <database is lock> 64 61 74 61 62 61 73 65 20 69 73 20 6C 6F 63 6B 
{25326} normal block at 0x05E13738, 19 bytes long.
Data: <database is lock> 64 61 74 61 62 61 73 65 20 69 73 20 6C 6F 63 6B
 Is there anyway to tell how this is happening? Otherwise cleanup is working 
fine. I don't have the message <database is lock> anywhere in my app, so I 
guess this must be from sqlite. 
 Thanks,
Mark

Reply via email to