longchar

Kalan

Member
Progress returns the error when we assign more thatn 32K character value into normal character variable. In order to overcome this we should use longchar data type.

But is there any disadvantages of using longchar data type? I heard there is some memory leak issue(Memory leak when passing a LONGCHAR as a function RETURN value)...

But I dont have clear about this. Can anyone pls explain this?

Thanks,
Alan
 

tamhas

ProgressTalk.com Sponsor
For any discussion of possible bugs and limitations, Progress version is critical.
 
there are some limitation on operation with longchar datatype.
def var a as longchar.
message a.

INPUT/OUTPUT operations are not allowed with RAW, ROWID, MEMPTR, BLOB, CLOB or LONGCHAR type variables. (11382)
 

medu

Member
I heard there is some memory leak issue(Memory leak when passing a LONGCHAR as a function RETURN value)...

well, unlike a memptr variable where you are in full control and must free it when done with it, for a longchar the memory allocation/re-allocation is done by the AVM behind the scene as with a regular character data type... so, if there are any memory leak issues those are just Progress bugs and will probably be fixed when reported.

that being said there were a number of memory leak issues reported for longchar, all of them looks like being fixed in versions 10.1C+... what you were referring to is probably the issue when the return value of a function is not assigned to a variable, probably the 'garbage collector' was left without a reference to that longchar hence the memory leak (P126403).
 
Top