TSQLite icon indicating copy to clipboard operation
TSQLite copied to clipboard

reference counted ISQLiteConnection and ISQLiteStatement

Open csm101 opened this issue 3 years ago • 0 comments

These interfaces are functionally equivalent to TSQLiteConnection and TSQLiteStatement, but their instances do not need to be explicitly deallocated when their reference count goes to zero.

I mean: this code is not leaking any memory.

begin 
   var conn := TSQLite.Connect(':memory:',saReadWrite);
   var stmt := conn.Prepare('select ..... ');
   while stmt.read do begin
      ...
   end;
end; 

csm101 avatar Apr 06 '23 12:04 csm101