The application is compiled using packages and in fact this particular set of code is in a .DLL loaded by the main application (all written in Delphi). Some of the code uses TUniSQL to execute UPDATE statements, but there's one small procedure that simply opens a table, appends a record, posts, and closes it. I was getting a memory leak and finally traced it down to that one procedure. If I commented everything out except the table .Open and table .Close, it still got the memory leak until I commented those lines out as well.
I tried some of the SpecificOptions in the TUniConnection component and discovered that if I set "Direct=True" (for the SQLite provider), then the memory leak went away when using Open/Close.
So this raises two questions in my mind:
- What are the pros/cons of using Direct mode? The help file simply says it will connect directly and not use the SQLite3 client library, but is there any drawback to that?
- Is this a bug in how the open/close methods of the TUniTable are implemented for the SQLite provider or is it something the client library affects somehow?
David.