Lee Kindness wrote:
> Okay, lets see if i've got this right...
> If I allocate the memory before the FETCH then I (naturally) free
> it. However If I NULL initialise the pointer then libecpg will
> allocate the memory and I must NOT free it - libecpg will free it
> automatically... Yeah?
No, I only said: Never mix free and ECPGfree_auto_mem because
ECPGfree_auto_mem will double free it if you free'd it already.
And also: it might be a good idea to kill the undocumented function (and
And: You need to free it (by one of the two methods above).
> I think this highlights the need for some documentation on this
Yes it does.
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 2002-05-06 13:36:02|
|Subject: Re: Native Windows, Apache Portable Runtime |
|Previous:||From: Marc G. Fournier||Date: 2002-05-06 12:01:36|
|Subject: Re: HEADS UP: Win32/OS2/BeOS native ports |
pgsql-interfaces by date
|Next:||From: Tom Lane||Date: 2002-05-06 15:27:08|
|Subject: Re: Using C functions with triggers |
|Previous:||From: Michael Meskes||Date: 2002-05-06 11:00:51|
|Subject: Re: [INTERFACES] ECPG: FETCH ALL|n FROM cursor - Memory allocation?|