TFBAdmin.Destroy causes a memory leak if Firebird is terminated.
Original Reporter info from Mantis: ssilvabruno
-
Reporter name: Bruno Siqueira
Original Reporter info from Mantis: ssilvabruno
- Reporter name: Bruno Siqueira
Description:
Hi,
During tests in one of the applications I work on, we found a situation where the TFBAdmin.Destroy method causes a memory leak.
Possible cause:
In the "Destroy" method, there is a call to the "Disconnect" method and this in turn can raise an exception within "CheckError ('DisConnect', FStatus)". As a result, the rest of the Destroy method is not executed.
Steps to reproduce:
1 - With the property "TFBAdmin.UseExceptions: = True", connect to the firebird server;
2 - Shut down the Firebird service;
3 - Try to destroy the TFBAdmin object (TFBAdmin.Free) and close the application.
Additional information:
Possible solution:
Along with the example project, I send a patch with the changes that solved the problems in our tests.
Mantis conversion info:
- Mantis ID: 37852
- OS: Windows 64
- OS Build: Windows 10
- Platform: x86-x64
- Version: 3.0.4
- Fixed in version: 3.3.1
- Fixed in revision: 47343 (#74b533f1)
- Target version: 3.2.2