Board index » delphi » Memory Management SOAP dynamic array
Patrick Paquette
![]() Delphi Developer |
Memory Management SOAP dynamic array2007-04-12 02:09:53 AM delphi230 Hi, I want to know how work memory management with webservice SOAP. example: I have and array of TRemotable descendant. If i call a function on the webservice who set the length of array and return it to my client. who should allocate length of the array ? client or server TMetaData = class(TRemotable) private FName: WideString; FValue: array of WideString; published property Name: WideString read FName write FName; property Value: array of WideString read FValue write FValue; end; TArrayOfMetaData = array of TMetaData; IDocutheque = interface(IInvokable) ['{A3B122C9-D158-407C-8B01-1975B614F93B}'] function RetrieveMetaDatas(sUserName, sPassword: string; sResID: string; var aMetaDatas: TArrayOfMetaData): Integer; end; main: var aMetaDatas: TArrayOfMetaData; begin // I think that i should create all TMetaData.create() for each element in the array and also set length of FValue array. but i wish not (HTTPRIO as IDocutheque).RetrieveMetaDatas(sUserName, sPassword: string; sResID: string; var aMetaDatas: TArrayOfMetaData) // is it true, or SOAP will manage it without us ? // it is can be very painfull to allocate all memory before call the function who populate the array, cause we have no idea how long is the dynamic array. someone can advice thanks |