Subject | Re: [IBO] IBO BUG: Resource Leak in IB_Components (verified in C++ Builder 6) |
---|---|
Author | zachs78 |
Post date | 2005-08-17T09:25:14Z |
We're using DLLs for several reasons -- they're pretty much similar to
BPL and we want to have compatibility between multiple development
platforms (namely MSVC). If it the package is written correctly, it
shouldn't have resource leaks (we have several components which are
larger in size and complexity than IBObject, yet none of them have
resource leaks).
Basically, we're wrapping IBObject up in a DLL to make it some sort of
a database connector, of which we already have 3 other connectors (to
Paradox, to our own server, and to another 3rd party DB). The DLL
provides a common API to the application sitting on top. The other 2
DLLs we have created did not face this problem.
Anyway, even without a DLL - i.e. simply #pragma link "IB_Component"
on an empty unit will give the same problem (just that CodeGuard
doesn't report it since the application has basically terminated). But
if you check the CGL file, SysFreeMem is still one less than
SysGetMem, same signature as with the DLL host.
BPL and we want to have compatibility between multiple development
platforms (namely MSVC). If it the package is written correctly, it
shouldn't have resource leaks (we have several components which are
larger in size and complexity than IBObject, yet none of them have
resource leaks).
Basically, we're wrapping IBObject up in a DLL to make it some sort of
a database connector, of which we already have 3 other connectors (to
Paradox, to our own server, and to another 3rd party DB). The DLL
provides a common API to the application sitting on top. The other 2
DLLs we have created did not face this problem.
Anyway, even without a DLL - i.e. simply #pragma link "IB_Component"
on an empty unit will give the same problem (just that CodeGuard
doesn't report it since the application has basically terminated). But
if you check the CGL file, SysFreeMem is still one less than
SysGetMem, same signature as with the DLL host.
>
> zachs78 wrote:
> > Dear All,
>
> > We've encountered a resource leak in IB_Components (as
> > reported by Codeguard).
> > To reproduce (100% reproduceable), follow these steps:
>
> > Create an 'empty' DLL (we'll call it Leak.dll):
>
> Just curious. Why a DLL?
>
> Have you run similar tests with BPLs? (Which are the usual way
> to do VCL libraries). I can think of lots of other (potential)
> issues with trying to use VCL stuff in DLLs, but since I have
> never even tried I dont really know.
>
> --
> Geoff Worboys
> Telesis Computing