Subject | Re: [ib-support] firebird api: who deallocs memory? |
---|---|
Author | Ann W. Harrison |
Post date | 2002-02-21T21:15:52Z |
>Hi,At 08:20 AM 2/21/2002 -0800, John Bellardo wrote:
>
>On Thursday, February 21, 2002, at 07:57 AM, C R Zamana wrote:
> >
> > The question is: who must free the dpb variable?
> >
>I think your problem is the use of isc_expand_dpb. That function doesJohn is right. Don't use isc_expand_dpb. It's a special purpose
>not do what you expect, and is poorly documented AFAIK. I suggest
>stuffing the user name and password into the dpb yourself, and seeing if
>that makes a difference. In terms of freeing the dpb, I'm pretty sure
>it is safe to do so as soon as isc_attach_database returns.
routine that makes it easier for a static preprocessor (gpre) to
create dpb blocks when it can't know the user name and password at
compile time. Among the things it does is allocate some memory for
the dpb - not the memory you gave it. Basically, it's a nasty slimy
little thing.
If you allocate your own dpb, you can release it after the attach
call.
Regards,
Ann