FireDAC on iOS
FireDAC on iOS
Hi
I'm using loads of TFDQuerys in an iOS application using SQLite. I have a global connection object they all use.
I'm suffering random crashes in the app (particularly on iPad Mini 3) that seem to related to my db accesses.
I'm using the usual desktop pattern..
aQuery := TFDQuery.Create(nil);
try
aQuery.Connection := MyGlobalConnection;
aQuery.SQL.Text := '...';
aQuery.Active := true;
// do things
finally
aQuery.Free;
end;
I've single stepped in to the 'Free' call, and the reference count doesn't seem to reduce to 0. It's mostly this that's making me wonder about a leak.
I've tried calling Close before the free and that appears to make no difference.
Any suggestions on what's going on?
Cheers
Hi
I'm using loads of TFDQuerys in an iOS application using SQLite. I have a global connection object they all use.
I'm suffering random crashes in the app (particularly on iPad Mini 3) that seem to related to my db accesses.
I'm using the usual desktop pattern..
aQuery := TFDQuery.Create(nil);
try
aQuery.Connection := MyGlobalConnection;
aQuery.SQL.Text := '...';
aQuery.Active := true;
// do things
finally
aQuery.Free;
end;
I've single stepped in to the 'Free' call, and the reference count doesn't seem to reduce to 0. It's mostly this that's making me wonder about a leak.
I've tried calling Close before the free and that appears to make no difference.
Any suggestions on what's going on?
Cheers
Lars Fosdal Troublemaker! ;)
ReplyDeleteLars Fosdal Actually, yes ;-)
ReplyDeleteVince Bartlett Because, this nonsense is broken in the first place for compatibility reasons. If you remove that reason, then it can be fixed, but not sooner.
ReplyDelete