The correct way to write customMethod

Dear All,
on customizing server on Delphi …
If I want to create a [ROServiceMethod] as get a binary from server to client ,

 **function getTable(tableName:String; Out recCount:Integer):Binary ;**

like this way, will the result in Delphi will release ? will made the memory leak?
or just like this way :

procedure getTable(tableName:String; out recount:Integer; out:data:Binary);

what’s the best way work ?
Thank you …

Hi,

it will work w/o memory leaks.
RO SDK will release result after it will be serialized.

you can use any variant - both will work correctly.

Thank you very much